예제 #1
0
 public static byte[] KeyEncryptionKey(byte[] sharedSecret, byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] inputKeyingMaterial = Utilities.ConcatArrays(sharedSecret, ephemeralSharedSecret);
     byte[] keyEncryptionKey    = Blake2.KeyDerivation(inputKeyingMaterial, salt, Constants.EncryptionKeyLength);
     Utilities.ZeroArray(ephemeralSharedSecret);
     Utilities.ZeroArray(inputKeyingMaterial);
     return(keyEncryptionKey);
 }
예제 #2
0
파일: Generate.cs 프로젝트: tej0402/Kryptor
 public static byte[] KeyEncryptionKey(byte[] sharedSecret, byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] inputKeyingMaterial = Arrays.Concat(sharedSecret, ephemeralSharedSecret);
     byte[] keyEncryptionKey    = Blake2.KeyDerivation(inputKeyingMaterial, salt, Constants.EncryptionKeyLength);
     CryptographicOperations.ZeroMemory(ephemeralSharedSecret);
     CryptographicOperations.ZeroMemory(inputKeyingMaterial);
     return(keyEncryptionKey);
 }
예제 #3
0
 public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength);
     Utilities.ZeroArray(ephemeralSharedSecret);
     return(keyEncryptionKey);
 }
예제 #4
0
파일: Generate.cs 프로젝트: tej0402/Kryptor
 public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt)
 {
     byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength);
     CryptographicOperations.ZeroMemory(ephemeralSharedSecret);
     return(keyEncryptionKey);
 }