1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Implement support of Blake2s-256 hash algorithm and remove deprecated algorithms RIPEMD-160 and GOST89.

This commit is contained in:
Mounir IDRASSI
2022-03-07 00:45:30 +01:00
parent 2dee49d3c8
commit 36795a688f
50 changed files with 481 additions and 1943 deletions

View File

@@ -252,7 +252,7 @@ namespace VeraCrypt
void RandomNumberGenerator::Test ()
{
shared_ptr <Hash> origPoolHash = PoolHash;
PoolHash.reset (new Ripemd160());
PoolHash.reset (new Blake2s());
Pool.Zero();
Buffer buffer (1);
@@ -262,14 +262,14 @@ namespace VeraCrypt
AddToPool (buffer);
}
if (Crc32::ProcessBuffer (Pool) != 0x2de46d17)
if (Crc32::ProcessBuffer (Pool) != 0x9ae2fff8)
throw TestFailed (SRC_POS);
buffer.Allocate (PoolSize);
buffer.CopyFrom (PeekPool());
AddToPool (buffer);
if (Crc32::ProcessBuffer (Pool) != 0xcb88e019)
if (Crc32::ProcessBuffer (Pool) != 0x391135a7)
throw TestFailed (SRC_POS);
PoolHash = origPoolHash;

View File

@@ -303,8 +303,7 @@ namespace VeraCrypt
void CoreLinux::MountVolumeNative (shared_ptr <Volume> volume, MountOptions &options, const DirectoryPath &auxMountPoint) const
{
bool xts = (typeid (*volume->GetEncryptionMode()) == typeid (EncryptionModeXTS));
bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (GOST89))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik))
bool algoNotSupported = (typeid (*volume->GetEncryptionAlgorithm()) == typeid (Kuznyechik))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (CamelliaKuznyechik))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikTwofish))
|| (typeid (*volume->GetEncryptionAlgorithm()) == typeid (KuznyechikAES))