SAPTeam.Kryptor 0.5.10-alpha

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. 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.5.10-alpha
NuGet\Install-Package SAPTeam.Kryptor -Version 0.5.10-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.5.10-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SAPTeam.Kryptor --version 0.5.10-alpha
#r "nuget: SAPTeam.Kryptor, 0.5.10-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.5.10-alpha&prerelease

// Install SAPTeam.Kryptor as a Cake Tool
#tool nuget:?package=SAPTeam.Kryptor&version=0.5.10-alpha&prerelease

Kryptor

Gawe CI 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.1-alpha 43 4/18/2024
0.5.10-alpha 47 4/13/2024
0.5.9-alpha 44 4/13/2024
0.5.8-alpha 43 4/12/2024
0.5.6-alpha 42 4/12/2024
0.5.5-alpha 41 4/11/2024
0.5.4-alpha 37 4/11/2024
0.5.2-alpha 41 4/11/2024
0.4.2-alpha 39 4/11/2024
0.4.1-alpha 39 4/11/2024
0.3.9-alpha 42 4/11/2024
0.3.8-alpha 45 4/11/2024
0.3.6-alpha 39 4/10/2024
0.3.3-alpha 49 3/8/2024
0.3.2-alpha 46 3/8/2024
0.3.1-alpha 44 3/8/2024
0.2.7-alpha 59 3/6/2024
0.2.6-alpha 53 3/6/2024