SAPTeam.Kryptor 0.12.11-alpha

Prefix Reserved
This is a prerelease version of SAPTeam.Kryptor.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SAPTeam.Kryptor --version 0.12.11-alpha                
NuGet\Install-Package SAPTeam.Kryptor -Version 0.12.11-alpha                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SAPTeam.Kryptor" Version="0.12.11-alpha" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SAPTeam.Kryptor --version 0.12.11-alpha                
#r "nuget: SAPTeam.Kryptor, 0.12.11-alpha"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SAPTeam.Kryptor as a Cake Addin
#addin nuget:?package=SAPTeam.Kryptor&version=0.12.11-alpha&prerelease

// Install SAPTeam.Kryptor as a Cake Tool
#tool nuget:?package=SAPTeam.Kryptor&version=0.12.11-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

Gawe CI CodeQL codecov NuGet NuGet

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.

  1. Create a keystore using the KES Keystore Generator
KESKeyStore ks = KESKeyStore.Generate();
  1. Save the keystore to a file to use it later
File.WriteAllLines("keystore.kks", new string[] {ks.ToString()});
  1. 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

  1. Load the keystore from the file
KESKeyStore ks = KESKeyStore.FromString(File.ReadAllText("keystore.kks"));
  1. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 53 10/9/2024
0.20.2-alpha 47 10/8/2024
0.19.11-alpha 44 10/6/2024
0.19.10-alpha 43 10/6/2024
0.19.3-alpha 43 10/5/2024
0.18.6-alpha 48 10/4/2024
0.18.5-alpha 43 10/2/2024
0.18.2-alpha 47 10/1/2024
0.18.1-alpha 46 10/1/2024
0.17.1-alpha 48 9/29/2024
0.16.19-alpha 50 9/9/2024
0.16.18-alpha 36 9/8/2024
0.16.15-alpha 52 9/2/2024
0.16.14-alpha 50 9/1/2024
0.16.13-alpha 62 8/30/2024
0.16.11-alpha 47 8/29/2024
0.16.10-alpha 47 8/29/2024
0.16.7-alpha 50 8/29/2024
0.16.3-alpha 47 8/28/2024
0.16.1-alpha 45 8/28/2024
0.15.39-alpha 47 8/28/2024
0.15.37-alpha 46 8/28/2024
0.15.35-alpha 70 8/28/2024
0.15.31-alpha 47 8/27/2024
0.15.28-alpha 46 8/27/2024
0.15.26-alpha 54 8/26/2024
0.15.22-alpha 66 8/25/2024
0.15.21-alpha 67 8/24/2024
0.15.20-alpha 77 8/17/2024
0.15.19-alpha 72 8/16/2024
0.15.18-alpha 73 8/14/2024
0.15.16-alpha 58 8/14/2024
0.15.15-alpha 62 8/13/2024
0.15.14-alpha 66 8/13/2024
0.15.13-alpha 70 8/12/2024
0.15.12-alpha 57 8/12/2024
0.15.10-alpha 71 8/9/2024
0.15.9-alpha 50 8/7/2024
0.15.8-alpha 46 7/29/2024
0.15.6-alpha 51 7/27/2024
0.15.3-alpha 59 7/23/2024
0.15.2-alpha 55 7/23/2024
0.15.1-alpha 49 7/23/2024
0.14.13-alpha 53 7/23/2024
0.14.10-alpha 62 7/22/2024
0.14.9-alpha 58 7/22/2024
0.14.7-alpha 43 7/17/2024
0.14.1-alpha 49 7/16/2024
0.13.20-alpha 48 7/16/2024
0.13.16-alpha 49 7/16/2024
0.13.11-alpha 55 7/6/2024
0.13.10-alpha 48 7/6/2024
0.13.8-alpha 48 7/6/2024
0.13.7-alpha 54 7/6/2024
0.13.6-alpha 53 5/27/2024
0.13.5-alpha 60 5/25/2024
0.13.1-alpha 64 5/25/2024
0.12.11-alpha 64 5/23/2024
0.11.1-alpha 66 5/22/2024
0.10.15-alpha 55 5/22/2024
0.10.11-alpha 55 5/20/2024
0.10.10-alpha 55 5/20/2024
0.10.6-alpha 58 5/19/2024
0.10.5-alpha 54 5/19/2024
0.9.9-alpha 68 5/19/2024
0.9.1-alpha 55 5/18/2024
0.8.7-alpha 60 5/15/2024
0.8.6-alpha 68 5/15/2024
0.8.5-alpha 63 5/15/2024
0.8.3-alpha 62 5/14/2024
0.8.1-alpha 62 5/14/2024
0.7.5-alpha 57 5/13/2024
0.7.4-alpha 54 5/13/2024
0.7.3-alpha 58 5/13/2024
0.7.1-alpha 52 5/12/2024
0.6.1-alpha 67 4/18/2024
0.5.10-alpha 66 4/13/2024
0.5.9-alpha 62 4/13/2024
0.5.8-alpha 64 4/12/2024
0.5.6-alpha 62 4/12/2024
0.5.5-alpha 62 4/11/2024
0.5.4-alpha 63 4/11/2024
0.5.2-alpha 65 4/11/2024
0.4.2-alpha 60 4/11/2024
0.4.1-alpha 57 4/11/2024
0.3.9-alpha 64 4/11/2024
0.3.8-alpha 59 4/11/2024
0.3.6-alpha 60 4/10/2024
0.3.3-alpha 70 3/8/2024
0.3.2-alpha 64 3/8/2024
0.3.1-alpha 60 3/8/2024
0.2.7-alpha 77 3/6/2024
0.2.6-alpha 71 3/6/2024