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); }
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); }
public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt) { byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength); Utilities.ZeroArray(ephemeralSharedSecret); return(keyEncryptionKey); }
public static byte[] KeyEncryptionKey(byte[] ephemeralSharedSecret, byte[] salt) { byte[] keyEncryptionKey = Blake2.KeyDerivation(ephemeralSharedSecret, salt, Constants.EncryptionKeyLength); CryptographicOperations.ZeroMemory(ephemeralSharedSecret); return(keyEncryptionKey); }