Ixian SDK
IXICore.CryptoKey.KeyDerivation Class Reference

Class is able to deterministically generate child RSA keys from a pool of random data. Note: Please do not put this into production until a crypto-expert takes a look at it. This falls under the heading "Roll your own crypto". The problem is that C# and Java (android) - and possibly iOS - implementations do not provide a way to do this. In some cases it's possible to substitute the random generator for something like Sha512/t digest, but the core RSA generation algorithm is implemented differently. That means generating RSA keys from the same starting point would yield different results on different platforms. Furthermore, implementations may change in the future, which would break all key derivation. I see no other way than to implement this ourselves, so that we have control over when we change it and appropriately handle legacy cases. More...

Public Member Functions

 KeyDerivation (byte[] entropy)
 
IxianKeyPair deriveKey (int key_index, int key_length, ulong public_exponent)
 

Static Public Member Functions

static byte [] getNewRandomSeed (int seed_len)
 
static void BenchmarkKeyGeneration (int num_iterations, int key_size, string output_file="")
 
static double calculateBytestreamEntropy (byte[] data)
 

Detailed Description

Class is able to deterministically generate child RSA keys from a pool of random data. Note: Please do not put this into production until a crypto-expert takes a look at it. This falls under the heading "Roll your own crypto". The problem is that C# and Java (android) - and possibly iOS - implementations do not provide a way to do this. In some cases it's possible to substitute the random generator for something like Sha512/t digest, but the core RSA generation algorithm is implemented differently. That means generating RSA keys from the same starting point would yield different results on different platforms. Furthermore, implementations may change in the future, which would break all key derivation. I see no other way than to implement this ourselves, so that we have control over when we change it and appropriately handle legacy cases.

Definition at line 21 of file KeyDerivation.cs.

Constructor & Destructor Documentation

◆ KeyDerivation()

IXICore.CryptoKey.KeyDerivation.KeyDerivation ( byte []  entropy)

Definition at line 93 of file KeyDerivation.cs.

Member Function Documentation

◆ BenchmarkKeyGeneration()

static void IXICore.CryptoKey.KeyDerivation.BenchmarkKeyGeneration ( int  num_iterations,
int  key_size,
string  output_file = "" 
)
static

Definition at line 168 of file KeyDerivation.cs.

◆ calculateBytestreamEntropy()

static double IXICore.CryptoKey.KeyDerivation.calculateBytestreamEntropy ( byte []  data)
static

Definition at line 214 of file KeyDerivation.cs.

◆ deriveKey()

IxianKeyPair IXICore.CryptoKey.KeyDerivation.deriveKey ( int  key_index,
int  key_length,
ulong  public_exponent 
)

Definition at line 141 of file KeyDerivation.cs.

◆ getNewRandomSeed()

static byte [] IXICore.CryptoKey.KeyDerivation.getNewRandomSeed ( int  seed_len)
static

Definition at line 160 of file KeyDerivation.cs.


The documentation for this class was generated from the following file: