From e90e24b30b379752bf6531c663085de1d2a653d7 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 9 Aug 2016 14:25:52 +0200 Subject: Windows: Add support for Streebog (hash) and kuznyechik (encryption) --- src/Common/BootEncryption.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Common/BootEncryption.cpp') diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index bf65fd6a..b18d1ce1 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -1082,11 +1082,23 @@ namespace VeraCrypt ea = SERPENT; else if (_stricmp (request.BootEncryptionAlgorithmName, "Twofish") == 0) ea = TWOFISH; + else if (_stricmp (request.BootEncryptionAlgorithmName, "Camellia") == 0) + ea = CAMELLIA; +#if defined(CIPHER_GOST89) + else if (_stricmp (request.BootEncryptionAlgorithmName, "GOST89") == 0) + ea = GOST89; +#endif if (_stricmp(request.BootPrfAlgorithmName, "SHA-256") == 0) pkcs5_prf = SHA256; else if (_stricmp(request.BootPrfAlgorithmName, "RIPEMD-160") == 0) pkcs5_prf = RIPEMD160; + else if (_stricmp(request.BootPrfAlgorithmName, "SHA-512") == 0) + pkcs5_prf = SHA512; + else if (_stricmp(request.BootPrfAlgorithmName, "Whirlpool") == 0) + pkcs5_prf = WHIRLPOOL; + else if (_stricmp(request.BootPrfAlgorithmName, "Streebog") == 0) + pkcs5_prf = STREEBOG; else if (strlen(request.BootPrfAlgorithmName) == 0) // case of version < 1.0f pkcs5_prf = RIPEMD160; } @@ -1101,6 +1113,9 @@ namespace VeraCrypt } catch (...) { } } + + if (pkcs5_prf == 0) + throw ParameterIncorrect (SRC_POS); } else { -- cgit v1.2.3