VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Volume/Pkcs5Kdf.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-09 12:25:52 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-14 23:09:11 (GMT)
commite90e24b30b379752bf6531c663085de1d2a653d7 (patch)
tree6ff3a18a2e9dedb9e506d67f2c560e1c8f657e47 /src/Volume/Pkcs5Kdf.cpp
parent0b2c8b09c6eb3ddce22fa88c34a640881f8f2177 (diff)
downloadVeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.zip
VeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.tar.gz
Windows: Add support for Streebog (hash) and kuznyechik (encryption)
Diffstat (limited to 'src/Volume/Pkcs5Kdf.cpp')
-rw-r--r--src/Volume/Pkcs5Kdf.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Volume/Pkcs5Kdf.cpp b/src/Volume/Pkcs5Kdf.cpp
index d56fe02..1e229d1 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());
+ }
}