diff options
Diffstat (limited to 'src/Volume')
-rw-r--r-- | src/Volume/Cipher.cpp | 44 | ||||
-rw-r--r-- | src/Volume/Cipher.h | 3 | ||||
-rw-r--r-- | src/Volume/EncryptionAlgorithm.cpp | 12 | ||||
-rw-r--r-- | src/Volume/EncryptionAlgorithm.h | 1 | ||||
-rw-r--r-- | src/Volume/EncryptionTest.cpp | 61 | ||||
-rw-r--r-- | src/Volume/Hash.cpp | 21 | ||||
-rw-r--r-- | src/Volume/Hash.h | 20 | ||||
-rw-r--r-- | src/Volume/Pkcs5Kdf.cpp | 11 | ||||
-rw-r--r-- | src/Volume/Pkcs5Kdf.h | 36 | ||||
-rw-r--r-- | src/Volume/Volume.make | 12 | ||||
-rw-r--r-- | src/Volume/VolumeLayout.cpp | 8 |
11 files changed, 60 insertions, 169 deletions
diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp index 02ee6989..8c6ce390 100644 --- a/src/Volume/Cipher.cpp +++ b/src/Volume/Cipher.cpp @@ -15,9 +15,8 @@ #include "Crypto/Aes.h" #include "Crypto/SerpentFast.h" #include "Crypto/Twofish.h" #include "Crypto/Camellia.h" -#include "Crypto/GostCipher.h" #include "Crypto/kuznyechik.h" #ifdef TC_AES_HW_CPU # include "Crypto/Aes_hw_cpu.h" @@ -97,9 +96,8 @@ namespace VeraCrypt l.push_back (shared_ptr <Cipher> (new CipherAES ())); l.push_back (shared_ptr <Cipher> (new CipherSerpent ())); l.push_back (shared_ptr <Cipher> (new CipherTwofish ())); l.push_back (shared_ptr <Cipher> (new CipherCamellia ())); - l.push_back (shared_ptr <Cipher> (new CipherGost89 ())); l.push_back (shared_ptr <Cipher> (new CipherKuznyechik ())); return l; } @@ -398,50 +396,8 @@ namespace VeraCrypt return false; #endif } - // GOST89 - void CipherGost89::Decrypt (byte *data) const - { - gost_decrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1); - } - - void CipherGost89::Encrypt (byte *data) const - { - gost_encrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1); - } - - size_t CipherGost89::GetScheduledKeySize () const - { - return GOST_KS; - } - - void CipherGost89::SetCipherKey (const byte *key) - { - gost_set_key (key, (gost_kds *) ScheduledKey.Ptr(), 1); - } - - // GOST89 with static SBOX - void CipherGost89StaticSBOX::Decrypt (byte *data) const - { - gost_decrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1); - } - - void CipherGost89StaticSBOX::Encrypt (byte *data) const - { - gost_encrypt (data, data, (gost_kds *) ScheduledKey.Ptr(), 1); - } - - size_t CipherGost89StaticSBOX::GetScheduledKeySize () const - { - return GOST_KS; - } - - void CipherGost89StaticSBOX::SetCipherKey (const byte *key) - { - gost_set_key (key, (gost_kds *) ScheduledKey.Ptr(), 0); - } - // Kuznyechik void CipherKuznyechik::Decrypt (byte *data) const { kuznyechik_decrypt_block (data, data, (kuznyechik_kds *) ScheduledKey.Ptr()); diff --git a/src/Volume/Cipher.h b/src/Volume/Cipher.h index 061dcc38..31a519a5 100644 --- a/src/Volume/Cipher.h +++ b/src/Volume/Cipher.h @@ -107,11 +107,8 @@ namespace VeraCrypt #undef TC_CIPHER_ADD_METHODS #define TC_CIPHER_ADD_METHODS - TC_CIPHER (Gost89, 16, 32); - TC_CIPHER (Gost89StaticSBOX, 16, 32); - #undef TC_CIPHER #define TC_EXCEPTION(NAME) TC_EXCEPTION_DECL(NAME,CipherException) diff --git a/src/Volume/EncryptionAlgorithm.cpp b/src/Volume/EncryptionAlgorithm.cpp index b94f69fa..85d9be1c 100644 --- a/src/Volume/EncryptionAlgorithm.cpp +++ b/src/Volume/EncryptionAlgorithm.cpp @@ -64,9 +64,8 @@ namespace VeraCrypt l.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); - l.push_back (shared_ptr <EncryptionAlgorithm> (new GOST89 ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); l.push_back (shared_ptr <EncryptionAlgorithm> (new CamelliaKuznyechik ())); @@ -300,19 +299,8 @@ namespace VeraCrypt SupportedModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); } - - // GOST89 - GOST89::GOST89 () - { - Deprecated = true; - - Ciphers.push_back (shared_ptr <Cipher> (new CipherGost89())); - - SupportedModes.push_back (shared_ptr <EncryptionMode> (new EncryptionModeXTS ())); - } - // Kuznyechik Kuznyechik::Kuznyechik () { Ciphers.push_back (shared_ptr <Cipher> (new CipherKuznyechik())); diff --git a/src/Volume/EncryptionAlgorithm.h b/src/Volume/EncryptionAlgorithm.h index a701e700..56642146 100644 --- a/src/Volume/EncryptionAlgorithm.h +++ b/src/Volume/EncryptionAlgorithm.h @@ -85,9 +85,8 @@ namespace VeraCrypt TC_ENCRYPTION_ALGORITHM (Twofish); TC_ENCRYPTION_ALGORITHM (TwofishSerpent); TC_ENCRYPTION_ALGORITHM (SerpentTwofishAES); TC_ENCRYPTION_ALGORITHM (Camellia); - TC_ENCRYPTION_ALGORITHM (GOST89); TC_ENCRYPTION_ALGORITHM (Kuznyechik); TC_ENCRYPTION_ALGORITHM (KuznyechikTwofish); TC_ENCRYPTION_ALGORITHM (KuznyechikAES); TC_ENCRYPTION_ALGORITHM (KuznyechikSerpentCamellia); diff --git a/src/Volume/EncryptionTest.cpp b/src/Volume/EncryptionTest.cpp index 22aea220..5c251bd5 100644 --- a/src/Volume/EncryptionTest.cpp +++ b/src/Volume/EncryptionTest.cpp @@ -122,25 +122,9 @@ namespace VeraCrypt 0xEA, 0x02, 0x47, 0x14, 0xAD, 0x5C, 0x4D, 0x84, 0xEA, 0x02, 0x47, 0x14, 0xAD, 0x5C, 0x4D, 0x84 } } }; - - static const CipherTestVector GOST89TestVectors[] = - { - { - { - 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, - 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF - }, - { - 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88 - }, - { - 0x8F, 0xC6, 0xFE, 0xB8, 0x91, 0x51, 0x4C, 0x37, 0x4D, 0x51, 0x46, 0xEF, 0x02, 0x9D, 0xBD, 0x9F - } - } - }; - + static const CipherTestVector KuznyechikTestVectors[] = { { { @@ -214,11 +198,8 @@ namespace VeraCrypt CipherCamellia camellia; TestCipher (camellia, CamelliaTestVectors, array_capacity (CamelliaTestVectors)); - CipherGost89StaticSBOX gost89; - TestCipher (gost89, GOST89TestVectors, array_capacity (GOST89TestVectors)); - CipherKuznyechik kuznyechik; TestCipher (kuznyechik, KuznyechikTestVectors, array_capacity (KuznyechikTestVectors)); } @@ -652,34 +633,8 @@ namespace VeraCrypt nTestsPerformed++; break; } } - else if (typeid (ea) == typeid (GOST89)) - { - switch (testCase) - { - case 0: - if (crc != 0x12194ef5) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 1: - if (crc != 0xda8d429b) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 2: - if (crc != 0xdbf0b12e) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - case 3: - if (crc != 0xb986eb4a) - throw TestFailed (SRC_POS); - nTestsPerformed++; - break; - } - } else if (typeid (ea) == typeid (Kuznyechik)) { switch (testCase) { @@ -1036,14 +991,8 @@ namespace VeraCrypt if (crc != 0x8176b223) throw TestFailed (SRC_POS); nTestsPerformed++; } - else if (typeid (ea) == typeid (GOST89)) - { - if (crc != 0x9e8653cb) - throw TestFailed (SRC_POS); - nTestsPerformed++; - } else if (typeid (ea) == typeid (Kuznyechik)) { if (crc != 0xd6d39cdb) throw TestFailed (SRC_POS); @@ -1120,9 +1069,9 @@ namespace VeraCrypt nTestsPerformed++; } - if (nTestsPerformed != 160) + if (nTestsPerformed != 150) throw TestFailed (SRC_POS); } void EncryptionTest::TestPkcs5 () @@ -1131,11 +1080,11 @@ namespace VeraCrypt static const byte saltData[] = { 0x12, 0x34, 0x56, 0x78 }; ConstBufferPtr salt (saltData, sizeof (saltData)); Buffer derivedKey (4); - Pkcs5HmacRipemd160 pkcs5HmacRipemd160(false); - pkcs5HmacRipemd160.DeriveKey (derivedKey, password, salt, 5); - if (memcmp (derivedKey.Ptr(), "\x7a\x3d\x7c\x03", 4) != 0) + Pkcs5HmacBlake2s pkcs5HmacBlake2s; + pkcs5HmacBlake2s.DeriveKey (derivedKey, password, salt, 5); + if (memcmp (derivedKey.Ptr(), "\x8d\x51\xfa\x31", 4) != 0) throw TestFailed (SRC_POS); Pkcs5HmacSha512 pkcs5HmacSha512(false); pkcs5HmacSha512.DeriveKey (derivedKey, password, salt, 5); diff --git a/src/Volume/Hash.cpp b/src/Volume/Hash.cpp index 3925dde6..aad900c1 100644 --- a/src/Volume/Hash.cpp +++ b/src/Volume/Hash.cpp @@ -11,9 +11,9 @@ */ #include "Hash.h" -#include "Crypto/Rmd160.h" +#include "Crypto/blake2.h" #include "Crypto/Sha2.h" #include "Crypto/Whirlpool.h" #include "Crypto/Streebog.h" @@ -24,11 +24,11 @@ namespace VeraCrypt HashList l; l.push_back (shared_ptr <Hash> (new Sha512 ())); l.push_back (shared_ptr <Hash> (new Whirlpool ())); + l.push_back (shared_ptr <Hash> (new Blake2s ())); l.push_back (shared_ptr <Hash> (new Sha256 ())); l.push_back (shared_ptr <Hash> (new Streebog ())); - l.push_back (shared_ptr <Hash> (new Ripemd160 ())); return l; } @@ -44,30 +44,29 @@ namespace VeraCrypt throw ParameterIncorrect (SRC_POS); } // RIPEMD-160 - Ripemd160::Ripemd160 () + Blake2s::Blake2s () { - Deprecated = true; // Mark RIPEMD-160 as deprecated like on Windows. - Context.Allocate (sizeof (RMD160_CTX), 32); + Context.Allocate (sizeof (blake2s_state), 32); Init(); } - void Ripemd160::GetDigest (const BufferPtr &buffer) + void Blake2s::GetDigest (const BufferPtr &buffer) { if_debug (ValidateDigestParameters (buffer)); - RMD160Final (buffer, (RMD160_CTX *) Context.Ptr()); + blake2s_final ((blake2s_state *) Context.Ptr(), buffer); } - void Ripemd160::Init () + void Blake2s::Init () { - RMD160Init ((RMD160_CTX *) Context.Ptr()); + blake2s_init ((blake2s_state *) Context.Ptr()); } - void Ripemd160::ProcessData (const ConstBufferPtr &data) + void Blake2s::ProcessData (const ConstBufferPtr &data) { if_debug (ValidateDataParameters (data)); - RMD160Update ((RMD160_CTX *) Context.Ptr(), data.Get(), (int) data.Size()); + blake2s_update ((blake2s_state *) Context.Ptr(), data.Get(), data.Size()); } // SHA-256 Sha256::Sha256 () diff --git a/src/Volume/Hash.h b/src/Volume/Hash.h index c76a6896..0e464b37 100644 --- a/src/Volume/Hash.h +++ b/src/Volume/Hash.h @@ -47,29 +47,29 @@ namespace VeraCrypt Hash (const Hash &); Hash &operator= (const Hash &); }; - // RIPEMD-160 - class Ripemd160 : public Hash + // Blake2s + class Blake2s : public Hash { public: - Ripemd160 (); - virtual ~Ripemd160 () { } + Blake2s (); + virtual ~Blake2s () { } virtual void GetDigest (const BufferPtr &buffer); virtual size_t GetBlockSize () const { return 64; } - virtual size_t GetDigestSize () const { return 160 / 8; } - virtual wstring GetName () const { return L"RIPEMD-160"; } - virtual wstring GetAltName () const { return L"RIPEMD160"; } - virtual shared_ptr <Hash> GetNew () const { return shared_ptr <Hash> (new Ripemd160); } + virtual size_t GetDigestSize () const { return 32; } + virtual wstring GetName () const { return L"BLAKE2s-256"; } + virtual wstring GetAltName () const { return L"BLAKE2s"; } + virtual shared_ptr <Hash> GetNew () const { return shared_ptr <Hash> (new Blake2s); } virtual void Init (); virtual void ProcessData (const ConstBufferPtr &data); protected: private: - Ripemd160 (const Ripemd160 &); - Ripemd160 &operator= (const Ripemd160 &); + Blake2s (const Blake2s &); + Blake2s &operator= (const Blake2s &); }; // SHA-256 class Sha256 : public Hash diff --git a/src/Volume/Pkcs5Kdf.cpp b/src/Volume/Pkcs5Kdf.cpp index ba5f46dd..fee057a8 100644 --- a/src/Volume/Pkcs5Kdf.cpp +++ b/src/Volume/Pkcs5Kdf.cpp @@ -57,16 +57,15 @@ namespace VeraCrypt if (truecryptMode) { l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 (true))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (true))); - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (true))); } else { l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 (false))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256 ())); + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacBlake2s ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (false))); - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (false))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ())); } return l; @@ -77,18 +76,18 @@ namespace VeraCrypt if (key.Size() < 1 || password.Size() < 1 || salt.Size() < 1 || iterationCount < 1) throw ParameterIncorrect (SRC_POS); } - void Pkcs5HmacRipemd160::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const + void Pkcs5HmacBlake2s_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_ripemd160 ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_blake2s ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); } - void Pkcs5HmacRipemd160_1000::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const + void Pkcs5HmacBlake2s::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { ValidateParameters (key, password, salt, iterationCount); - derive_key_ripemd160 ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); + derive_key_blake2s ((char *) password.DataPtr(), (int) password.Size(), (char *) salt.Get(), (int) salt.Size(), iterationCount, (char *) key.Get(), (int) key.Size()); } void Pkcs5HmacSha256_Boot::DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const { diff --git a/src/Volume/Pkcs5Kdf.h b/src/Volume/Pkcs5Kdf.h index 76cc56a0..25ad76e8 100644 --- a/src/Volume/Pkcs5Kdf.h +++ b/src/Volume/Pkcs5Kdf.h @@ -50,40 +50,40 @@ namespace VeraCrypt Pkcs5Kdf (const Pkcs5Kdf &); Pkcs5Kdf &operator= (const Pkcs5Kdf &); }; - class Pkcs5HmacRipemd160 : public Pkcs5Kdf + class Pkcs5HmacBlake2s_Boot : public Pkcs5Kdf { public: - Pkcs5HmacRipemd160 (bool truecryptMode) : Pkcs5Kdf (truecryptMode) { } - virtual ~Pkcs5HmacRipemd160 () { } + Pkcs5HmacBlake2s_Boot () : Pkcs5Kdf(false) { } + virtual ~Pkcs5HmacBlake2s_Boot () { } virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const; - virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Ripemd160); } - virtual int GetIterationCount (int pim) const { return m_truecryptMode? 2000 : (pim <= 0 ? 655331 : (15000 + (pim * 1000))) ; } - virtual wstring GetName () const { return L"HMAC-RIPEMD-160"; } - virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacRipemd160(m_truecryptMode); } + virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Blake2s); } + virtual int GetIterationCount (int pim) const { return pim <= 0 ? 200000 : (pim * 2048); } + virtual wstring GetName () const { return L"HMAC-BLAKE2s-256"; } + virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacBlake2s_Boot(); } private: - Pkcs5HmacRipemd160 (const Pkcs5HmacRipemd160 &); - Pkcs5HmacRipemd160 &operator= (const Pkcs5HmacRipemd160 &); + Pkcs5HmacBlake2s_Boot (const Pkcs5HmacBlake2s_Boot &); + Pkcs5HmacBlake2s_Boot &operator= (const Pkcs5HmacBlake2s_Boot &); }; - class Pkcs5HmacRipemd160_1000 : public Pkcs5Kdf + class Pkcs5HmacBlake2s : public Pkcs5Kdf { public: - Pkcs5HmacRipemd160_1000 (bool truecryptMode) : Pkcs5Kdf(truecryptMode) { } - virtual ~Pkcs5HmacRipemd160_1000 () { } + Pkcs5HmacBlake2s () : Pkcs5Kdf(false) { } + virtual ~Pkcs5HmacBlake2s () { } virtual void DeriveKey (const BufferPtr &key, const VolumePassword &password, const ConstBufferPtr &salt, int iterationCount) const; - virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Ripemd160); } - virtual int GetIterationCount (int pim) const { return m_truecryptMode? 1000 : (pim <= 0 ? 327661 : (pim * 2048)); } - virtual wstring GetName () const { return L"HMAC-RIPEMD-160"; } - virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacRipemd160_1000(m_truecryptMode); } + virtual shared_ptr <Hash> GetHash () const { return shared_ptr <Hash> (new Blake2s); } + virtual int GetIterationCount (int pim) const { return pim <= 0 ? 500000 : (15000 + (pim * 1000)); } + virtual wstring GetName () const { return L"HMAC-BLAKE2s-256"; } + virtual Pkcs5Kdf* Clone () const { return new Pkcs5HmacBlake2s(); } private: - Pkcs5HmacRipemd160_1000 (const Pkcs5HmacRipemd160_1000 &); - Pkcs5HmacRipemd160_1000 &operator= (const Pkcs5HmacRipemd160_1000 &); + Pkcs5HmacBlake2s (const Pkcs5HmacBlake2s &); + Pkcs5HmacBlake2s &operator= (const Pkcs5HmacBlake2s &); }; class Pkcs5HmacSha256_Boot : public Pkcs5Kdf { diff --git a/src/Volume/Volume.make b/src/Volume/Volume.make index a7f9ef0a..91f40fb7 100644 --- a/src/Volume/Volume.make +++ b/src/Volume/Volume.make @@ -70,19 +70,27 @@ endif else OBJS += ../Crypto/Aescrypt.o endif +ifeq "$(GCC_GTEQ_430)" "1" +OBJSSSE41 += ../Crypto/blake2s_SSE41.osse41 +OBJSSSSE3 += ../Crypto/blake2s_SSSE3.ossse3 +else +OBJS += ../Crypto/blake2s_SSE41.o +OBJS += ../Crypto/blake2s_SSSE3.o +endif + OBJS += ../Crypto/Aeskey.o OBJS += ../Crypto/Aestab.o OBJS += ../Crypto/cpu.o -OBJS += ../Crypto/Rmd160.o +OBJS += ../Crypto/blake2s.o +OBJS += ../Crypto/blake2s_SSE2.o OBJS += ../Crypto/SerpentFast.o OBJS += ../Crypto/SerpentFast_simd.o OBJS += ../Crypto/Sha2.o OBJS += ../Crypto/Twofish.o OBJS += ../Crypto/Whirlpool.o OBJS += ../Crypto/Camellia.o -OBJS += ../Crypto/GostCipher.o OBJS += ../Crypto/Streebog.o OBJS += ../Crypto/kuznyechik.o OBJS += ../Crypto/kuznyechik_simd.o diff --git a/src/Volume/VolumeLayout.cpp b/src/Volume/VolumeLayout.cpp index 0eaed427..3045ba83 100644 --- a/src/Volume/VolumeLayout.cpp +++ b/src/Volume/VolumeLayout.cpp @@ -99,9 +99,8 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new GOST89 ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new CamelliaKuznyechik ())); @@ -145,9 +144,8 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new GOST89 ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new CamelliaKuznyechik ())); @@ -198,9 +196,8 @@ namespace VeraCrypt SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AES ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Serpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Twofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Camellia ())); - SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new GOST89 ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new Kuznyechik ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofish ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new AESTwofishSerpent ())); SupportedEncryptionAlgorithms.push_back (shared_ptr <EncryptionAlgorithm> (new CamelliaKuznyechik ())); @@ -228,12 +225,11 @@ namespace VeraCrypt Pkcs5KdfList VolumeLayoutSystemEncryption::GetSupportedKeyDerivationFunctions (bool truecryptMode) const { Pkcs5KdfList l; if (!truecryptMode) - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256_Boot ())); - l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160_1000 (truecryptMode))); - if (!truecryptMode) { + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256_Boot ())); + l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacBlake2s_Boot ())); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 (false))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (false))); l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ())); } |