SAPTeam.Kryptor
0.20.4-alpha
Prefix Reserved
dotnet add package SAPTeam.Kryptor --version 0.20.4-alpha
NuGet\Install-Package SAPTeam.Kryptor -Version 0.20.4-alpha
<PackageReference Include="SAPTeam.Kryptor" Version="0.20.4-alpha" />
paket add SAPTeam.Kryptor --version 0.20.4-alpha
#r "nuget: SAPTeam.Kryptor, 0.20.4-alpha"
// Install SAPTeam.Kryptor as a Cake Addin #addin nuget:?package=SAPTeam.Kryptor&version=0.20.4-alpha&prerelease // Install SAPTeam.Kryptor as a Cake Tool #tool nuget:?package=SAPTeam.Kryptor&version=0.20.4-alpha&prerelease
Outdated Readme
This Readme file belongs to the first alpha versions of Kryptor, The public API of this library heavily changed and this file will be updated on first stable release.
Kryptor
Kryptor is a key-based encryption engine that currently uses the KES encryption algorithm to encrypt and decrypt data.
What is the KES?
KES is a complex encryption algorithm that uses a keystore to encrypt and decrypt data.
A keystore can contain up to 128 keys, and each key is used to encrypt and decrypt parts of data. Every 32 bytes of data is encrypted using a different key, and the keys are used in a round-robin fashion. in other words, the first 32 bytes of data are encrypted using the first key, the next 32 bytes are encrypted using the second key, and so on. When the end of the keystore is reached, the encryption process starts over from the beginning of the keystore.
In this way, in a 128-key keystore, the first 128*32 bytes of data are encrypted using the first 128 keys, and then the process starts over from the beginning of the keystore.
so in a 1 MB file, each key is used to encrypt and decrypt 8 KB of non-consecutive data. that makes it very difficult for an attacker to decrypt the data without the keystore. because the attacker would have to guess all 128 keys in the keystore to decrypt the data.
Each key has a length of 256 bits, so there are 2^256 possible options to guess, just for 1 key in the keystore, which makes it impossible for an attacker to guess all the keys.
How to use the KES?
To use the KES, you need to create a keystore using the KES Keystore Generator, and then use the keystore to encrypt and decrypt data using the KESProvider.
- Create a keystore using the KES Keystore Generator
KESKeyStore ks = KESKeyStore.Generate();
- Save the keystore to a file to use it later
File.WriteAllLines("keystore.kks", new string[] {ks.ToString()});
- Encrypt data using the KESProvider
KESProvider kp = new KESProvider(ks);
kp.EncryptFile("InputFile", "OutputFile");
and to decrypt the data, use the same keystore to decrypt the data
- Load the keystore from the file
KESKeyStore ks = KESKeyStore.FromString(File.ReadAllText("keystore.kks"));
- Decrypt the data using the KESProvider
KESProvider kp = new KESProvider(ks);
kp.DecryptFile("InputFile", "OutputFile");
Note: You can also use the KESProvider to encrypt and decrypt data in memory with the EncryptBlock and DecryptBlock methods.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Text.Json (>= 6.0.10)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.0
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.ValueTuple (>= 4.5.0)
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SAPTeam.Kryptor:
Package | Downloads |
---|---|
SAPTeam.Kryptor.Client
This library has common utilities used by kryptor front-end programs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.20.4-alpha | 55 | 10/9/2024 |
0.20.2-alpha | 49 | 10/8/2024 |
0.19.11-alpha | 46 | 10/6/2024 |
0.19.10-alpha | 46 | 10/6/2024 |
0.19.3-alpha | 47 | 10/5/2024 |
0.18.6-alpha | 52 | 10/4/2024 |
0.18.5-alpha | 51 | 10/2/2024 |
0.18.2-alpha | 51 | 10/1/2024 |
0.18.1-alpha | 50 | 10/1/2024 |
0.17.1-alpha | 52 | 9/29/2024 |
0.16.19-alpha | 57 | 9/9/2024 |
0.16.18-alpha | 43 | 9/8/2024 |
0.16.15-alpha | 57 | 9/2/2024 |
0.16.14-alpha | 57 | 9/1/2024 |
0.16.13-alpha | 68 | 8/30/2024 |
0.16.11-alpha | 49 | 8/29/2024 |
0.16.10-alpha | 49 | 8/29/2024 |
0.16.7-alpha | 56 | 8/29/2024 |
0.16.3-alpha | 53 | 8/28/2024 |
0.16.1-alpha | 49 | 8/28/2024 |
0.15.39-alpha | 51 | 8/28/2024 |
0.15.37-alpha | 50 | 8/28/2024 |
0.15.35-alpha | 72 | 8/28/2024 |
0.15.31-alpha | 49 | 8/27/2024 |
0.15.28-alpha | 48 | 8/27/2024 |
0.15.26-alpha | 56 | 8/26/2024 |
0.15.22-alpha | 68 | 8/25/2024 |
0.15.21-alpha | 69 | 8/24/2024 |
0.15.20-alpha | 79 | 8/17/2024 |
0.15.19-alpha | 76 | 8/16/2024 |
0.15.18-alpha | 75 | 8/14/2024 |
0.15.16-alpha | 60 | 8/14/2024 |
0.15.15-alpha | 64 | 8/13/2024 |
0.15.14-alpha | 68 | 8/13/2024 |
0.15.13-alpha | 72 | 8/12/2024 |
0.15.12-alpha | 59 | 8/12/2024 |
0.15.10-alpha | 73 | 8/9/2024 |
0.15.9-alpha | 55 | 8/7/2024 |
0.15.8-alpha | 48 | 7/29/2024 |
0.15.6-alpha | 55 | 7/27/2024 |
0.15.3-alpha | 63 | 7/23/2024 |
0.15.2-alpha | 57 | 7/23/2024 |
0.15.1-alpha | 53 | 7/23/2024 |
0.14.13-alpha | 59 | 7/23/2024 |
0.14.10-alpha | 64 | 7/22/2024 |
0.14.9-alpha | 62 | 7/22/2024 |
0.14.7-alpha | 45 | 7/17/2024 |
0.14.1-alpha | 51 | 7/16/2024 |
0.13.20-alpha | 50 | 7/16/2024 |
0.13.16-alpha | 51 | 7/16/2024 |
0.13.11-alpha | 57 | 7/6/2024 |
0.13.10-alpha | 52 | 7/6/2024 |
0.13.8-alpha | 50 | 7/6/2024 |
0.13.7-alpha | 58 | 7/6/2024 |
0.13.6-alpha | 57 | 5/27/2024 |
0.13.5-alpha | 62 | 5/25/2024 |
0.13.1-alpha | 66 | 5/25/2024 |
0.12.11-alpha | 68 | 5/23/2024 |
0.11.1-alpha | 72 | 5/22/2024 |
0.10.15-alpha | 61 | 5/22/2024 |
0.10.11-alpha | 63 | 5/20/2024 |
0.10.10-alpha | 59 | 5/20/2024 |
0.10.6-alpha | 60 | 5/19/2024 |
0.10.5-alpha | 56 | 5/19/2024 |
0.9.9-alpha | 72 | 5/19/2024 |
0.9.1-alpha | 57 | 5/18/2024 |
0.8.7-alpha | 64 | 5/15/2024 |
0.8.6-alpha | 70 | 5/15/2024 |
0.8.5-alpha | 67 | 5/15/2024 |
0.8.3-alpha | 64 | 5/14/2024 |
0.8.1-alpha | 64 | 5/14/2024 |
0.7.5-alpha | 59 | 5/13/2024 |
0.7.4-alpha | 56 | 5/13/2024 |
0.7.3-alpha | 62 | 5/13/2024 |
0.7.1-alpha | 54 | 5/12/2024 |
0.6.1-alpha | 71 | 4/18/2024 |
0.5.10-alpha | 72 | 4/13/2024 |
0.5.9-alpha | 64 | 4/13/2024 |
0.5.8-alpha | 66 | 4/12/2024 |
0.5.6-alpha | 64 | 4/12/2024 |
0.5.5-alpha | 64 | 4/11/2024 |
0.5.4-alpha | 67 | 4/11/2024 |
0.5.2-alpha | 69 | 4/11/2024 |
0.4.2-alpha | 62 | 4/11/2024 |
0.4.1-alpha | 61 | 4/11/2024 |
0.3.9-alpha | 66 | 4/11/2024 |
0.3.8-alpha | 61 | 4/11/2024 |
0.3.6-alpha | 62 | 4/10/2024 |
0.3.3-alpha | 74 | 3/8/2024 |
0.3.2-alpha | 66 | 3/8/2024 |
0.3.1-alpha | 62 | 3/8/2024 |
0.2.7-alpha | 79 | 3/6/2024 |
0.2.6-alpha | 73 | 3/6/2024 |