diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-08-09 14:25:52 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2016-08-15 01:09:11 +0200 |
commit | e90e24b30b379752bf6531c663085de1d2a653d7 (patch) | |
tree | 6ff3a18a2e9dedb9e506d67f2c560e1c8f657e47 /src/Volume/Pkcs5Kdf.cpp | |
parent | 0b2c8b09c6eb3ddce22fa88c34a640881f8f2177 (diff) | |
download | VeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.tar.gz VeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.zip |
Windows: Add support for Streebog (hash) and kuznyechik (encryption)
Diffstat (limited to 'src/Volume/Pkcs5Kdf.cpp')
-rw-r--r-- | src/Volume/Pkcs5Kdf.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Volume/Pkcs5Kdf.cpp b/src/Volume/Pkcs5Kdf.cpp index d56fe029..1e229d10 100644 --- a/src/Volume/Pkcs5Kdf.cpp +++ b/src/Volume/Pkcs5Kdf.cpp @@ -66,6 +66,7 @@ namespace VeraCrypt l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (false))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256 ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (false))); + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ())); } return l; @@ -112,4 +113,16 @@ namespace VeraCrypt ValidateParameters (key, password, salt, iterationCount); derive_key_whirlpool ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); } + + void Pkcs5HmacStreebog::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const + { + ValidateParameters (key, password, salt, iterationCount); + derive_key_streebog ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + } + + void Pkcs5HmacStreebog_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const + { + ValidateParameters (key, password, salt, iterationCount); + derive_key_streebog ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + } } |