SAPTeam.Kryptor
0.15.2-alpha
Prefix Reserved
See the version list below for details.
dotnet add package SAPTeam.Kryptor --version 0.15.2-alpha
NuGet\Install-Package SAPTeam.Kryptor -Version 0.15.2-alpha
<PackageReference Include="SAPTeam.Kryptor" Version="0.15.2-alpha" />
paket add SAPTeam.Kryptor --version 0.15.2-alpha
#r "nuget: SAPTeam.Kryptor, 0.15.2-alpha"
// Install SAPTeam.Kryptor as a Cake Addin #addin nuget:?package=SAPTeam.Kryptor&version=0.15.2-alpha&prerelease // Install SAPTeam.Kryptor as a Cake Tool #tool nuget:?package=SAPTeam.Kryptor&version=0.15.2-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 was computed. 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 was computed. 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
- Ensure.That (>= 10.1.0)
- morelinq (>= 4.2.0)
- Newtonsoft.Json (>= 13.0.3)
- RandomDataGenerator.Net (>= 1.0.17)
- System.Memory (>= 4.5.5)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.0
- Ensure.That (>= 10.1.0)
- morelinq (>= 4.2.0)
- Newtonsoft.Json (>= 13.0.3)
- RandomDataGenerator.Net (>= 1.0.17)
- System.Memory (>= 4.5.5)
- System.ValueTuple (>= 4.5.0)
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 | 46 | 10/9/2024 |
0.20.2-alpha | 41 | 10/8/2024 |
0.19.11-alpha | 40 | 10/6/2024 |
0.19.10-alpha | 38 | 10/6/2024 |
0.19.3-alpha | 38 | 10/5/2024 |
0.18.6-alpha | 42 | 10/4/2024 |
0.18.5-alpha | 38 | 10/2/2024 |
0.18.2-alpha | 43 | 10/1/2024 |
0.18.1-alpha | 43 | 10/1/2024 |
0.17.1-alpha | 45 | 9/29/2024 |
0.16.19-alpha | 47 | 9/9/2024 |
0.16.18-alpha | 33 | 9/8/2024 |
0.16.15-alpha | 49 | 9/2/2024 |
0.16.14-alpha | 47 | 9/1/2024 |
0.16.13-alpha | 55 | 8/30/2024 |
0.16.11-alpha | 41 | 8/29/2024 |
0.16.10-alpha | 40 | 8/29/2024 |
0.16.7-alpha | 43 | 8/29/2024 |
0.16.3-alpha | 44 | 8/28/2024 |
0.16.1-alpha | 41 | 8/28/2024 |
0.15.39-alpha | 44 | 8/28/2024 |
0.15.37-alpha | 42 | 8/28/2024 |
0.15.35-alpha | 67 | 8/28/2024 |
0.15.31-alpha | 43 | 8/27/2024 |
0.15.28-alpha | 43 | 8/27/2024 |
0.15.26-alpha | 50 | 8/26/2024 |
0.15.22-alpha | 63 | 8/25/2024 |
0.15.21-alpha | 64 | 8/24/2024 |
0.15.20-alpha | 74 | 8/17/2024 |
0.15.19-alpha | 69 | 8/16/2024 |
0.15.18-alpha | 69 | 8/14/2024 |
0.15.16-alpha | 54 | 8/14/2024 |
0.15.15-alpha | 58 | 8/13/2024 |
0.15.14-alpha | 63 | 8/13/2024 |
0.15.13-alpha | 66 | 8/12/2024 |
0.15.12-alpha | 54 | 8/12/2024 |
0.15.10-alpha | 68 | 8/9/2024 |
0.15.9-alpha | 47 | 8/7/2024 |
0.15.8-alpha | 43 | 7/29/2024 |
0.15.6-alpha | 48 | 7/27/2024 |
0.15.3-alpha | 55 | 7/23/2024 |
0.15.2-alpha | 52 | 7/23/2024 |
0.15.1-alpha | 46 | 7/23/2024 |
0.14.13-alpha | 49 | 7/23/2024 |
0.14.10-alpha | 58 | 7/22/2024 |
0.14.9-alpha | 54 | 7/22/2024 |
0.14.7-alpha | 39 | 7/17/2024 |
0.14.1-alpha | 45 | 7/16/2024 |
0.13.20-alpha | 45 | 7/16/2024 |
0.13.16-alpha | 46 | 7/16/2024 |
0.13.11-alpha | 51 | 7/6/2024 |
0.13.10-alpha | 45 | 7/6/2024 |
0.13.8-alpha | 45 | 7/6/2024 |
0.13.7-alpha | 51 | 7/6/2024 |
0.13.6-alpha | 50 | 5/27/2024 |
0.13.5-alpha | 57 | 5/25/2024 |
0.13.1-alpha | 61 | 5/25/2024 |
0.12.11-alpha | 61 | 5/23/2024 |
0.11.1-alpha | 63 | 5/22/2024 |
0.10.15-alpha | 52 | 5/22/2024 |
0.10.11-alpha | 52 | 5/20/2024 |
0.10.10-alpha | 52 | 5/20/2024 |
0.10.6-alpha | 53 | 5/19/2024 |
0.10.5-alpha | 49 | 5/19/2024 |
0.9.9-alpha | 62 | 5/19/2024 |
0.9.1-alpha | 48 | 5/18/2024 |
0.8.7-alpha | 54 | 5/15/2024 |
0.8.6-alpha | 64 | 5/15/2024 |
0.8.5-alpha | 59 | 5/15/2024 |
0.8.3-alpha | 58 | 5/14/2024 |
0.8.1-alpha | 57 | 5/14/2024 |
0.7.5-alpha | 52 | 5/13/2024 |
0.7.4-alpha | 50 | 5/13/2024 |
0.7.3-alpha | 53 | 5/13/2024 |
0.7.1-alpha | 47 | 5/12/2024 |
0.6.1-alpha | 62 | 4/18/2024 |
0.5.10-alpha | 62 | 4/13/2024 |
0.5.9-alpha | 56 | 4/13/2024 |
0.5.8-alpha | 59 | 4/12/2024 |
0.5.6-alpha | 57 | 4/12/2024 |
0.5.5-alpha | 58 | 4/11/2024 |
0.5.4-alpha | 56 | 4/11/2024 |
0.5.2-alpha | 61 | 4/11/2024 |
0.4.2-alpha | 55 | 4/11/2024 |
0.4.1-alpha | 52 | 4/11/2024 |
0.3.9-alpha | 61 | 4/11/2024 |
0.3.8-alpha | 56 | 4/11/2024 |
0.3.6-alpha | 57 | 4/10/2024 |
0.3.3-alpha | 67 | 3/8/2024 |
0.3.2-alpha | 60 | 3/8/2024 |
0.3.1-alpha | 56 | 3/8/2024 |
0.2.7-alpha | 74 | 3/6/2024 |
0.2.6-alpha | 66 | 3/6/2024 |