SAPTeam.Kryptor
0.16.19alpha
Prefix Reserved
dotnet add package SAPTeam.Kryptor version 0.16.19alpha
NuGet\InstallPackage SAPTeam.Kryptor Version 0.16.19alpha
<PackageReference Include="SAPTeam.Kryptor" Version="0.16.19alpha" />
paket add SAPTeam.Kryptor version 0.16.19alpha
#r "nuget: SAPTeam.Kryptor, 0.16.19alpha"
// Install SAPTeam.Kryptor as a Cake Addin #addin nuget:?package=SAPTeam.Kryptor&version=0.16.19alpha&prerelease // Install SAPTeam.Kryptor as a Cake Tool #tool nuget:?package=SAPTeam.Kryptor&version=0.16.19alpha&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 keybased 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 roundrobin 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 128key 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 nonconsecutive 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.0windows was computed. net6.0 is compatible. net6.0android was computed. net6.0ios was computed. net6.0maccatalyst was computed. net6.0macos was computed. net6.0tvos was computed. net6.0windows was computed. net7.0 was computed. net7.0android was computed. net7.0ios was computed. net7.0maccatalyst was computed. net7.0macos was computed. net7.0tvos was computed. net7.0windows was computed. net8.0 is compatible. net8.0android was computed. net8.0browser was computed. net8.0ios was computed. net8.0maccatalyst was computed. net8.0macos was computed. net8.0tvos was computed. net8.0windows 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.9)
 System.ValueTuple (>= 4.5.0)

.NETStandard 2.0
 System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
 System.Text.Json (>= 8.0.4)
 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 frontend programs. 
GitHub repositories
This package is not used by any popular GitHub repositories.
Version  Downloads  Last updated 

0.16.19alpha  32  9/9/2024 
0.16.18alpha  19  9/8/2024 
0.16.15alpha  35  9/2/2024 
0.16.14alpha  37  9/1/2024 
0.16.13alpha  45  8/30/2024 
0.16.11alpha  31  8/29/2024 
0.16.10alpha  32  8/29/2024 
0.16.7alpha  34  8/29/2024 
0.16.3alpha  36  8/28/2024 
0.16.1alpha  34  8/28/2024 
0.15.39alpha  36  8/28/2024 
0.15.37alpha  35  8/28/2024 
0.15.35alpha  59  8/28/2024 
0.15.31alpha  38  8/27/2024 
0.15.28alpha  36  8/27/2024 
0.15.26alpha  43  8/26/2024 
0.15.22alpha  54  8/25/2024 
0.15.21alpha  54  8/24/2024 
0.15.20alpha  66  8/17/2024 
0.15.19alpha  61  8/16/2024 
0.15.18alpha  61  8/14/2024 
0.15.16alpha  46  8/14/2024 
0.15.15alpha  52  8/13/2024 
0.15.14alpha  53  8/13/2024 
0.15.13alpha  58  8/12/2024 
0.15.12alpha  46  8/12/2024 
0.15.10alpha  61  8/9/2024 
0.15.9alpha  38  8/7/2024 
0.15.8alpha  36  7/29/2024 
0.15.6alpha  42  7/27/2024 
0.15.3alpha  48  7/23/2024 
0.15.2alpha  44  7/23/2024 
0.15.1alpha  38  7/23/2024 
0.14.13alpha  43  7/23/2024 
0.14.10alpha  52  7/22/2024 
0.14.9alpha  48  7/22/2024 
0.14.7alpha  34  7/17/2024 
0.14.1alpha  40  7/16/2024 
0.13.20alpha  39  7/16/2024 
0.13.16alpha  40  7/16/2024 
0.13.11alpha  47  7/6/2024 
0.13.10alpha  40  7/6/2024 
0.13.8alpha  40  7/6/2024 
0.13.7alpha  46  7/6/2024 
0.13.6alpha  45  5/27/2024 
0.13.5alpha  52  5/25/2024 
0.13.1alpha  55  5/25/2024 
0.12.11alpha  56  5/23/2024 
0.11.1alpha  58  5/22/2024 
0.10.15alpha  47  5/22/2024 
0.10.11alpha  47  5/20/2024 
0.10.10alpha  47  5/20/2024 
0.10.6alpha  49  5/19/2024 
0.10.5alpha  45  5/19/2024 
0.9.9alpha  58  5/19/2024 
0.9.1alpha  45  5/18/2024 
0.8.7alpha  50  5/15/2024 
0.8.6alpha  53  5/15/2024 
0.8.5alpha  53  5/15/2024 
0.8.3alpha  53  5/14/2024 
0.8.1alpha  44  5/14/2024 
0.7.5alpha  47  5/13/2024 
0.7.4alpha  45  5/13/2024 
0.7.3alpha  48  5/13/2024 
0.7.1alpha  42  5/12/2024 
0.6.1alpha  56  4/18/2024 
0.5.10alpha  57  4/13/2024 
0.5.9alpha  53  4/13/2024 
0.5.8alpha  51  4/12/2024 
0.5.6alpha  55  4/12/2024 
0.5.5alpha  48  4/11/2024 
0.5.4alpha  48  4/11/2024 
0.5.2alpha  58  4/11/2024 
0.4.2alpha  53  4/11/2024 
0.4.1alpha  48  4/11/2024 
0.3.9alpha  50  4/11/2024 
0.3.8alpha  53  4/11/2024 
0.3.6alpha  54  4/10/2024 
0.3.3alpha  62  3/8/2024 
0.3.2alpha  56  3/8/2024 
0.3.1alpha  54  3/8/2024 
0.2.7alpha  71  3/6/2024 
0.2.6alpha  63  3/6/2024 