mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Add support for Streebog (hash) and kuznyechik (encryption)
This commit is contained in:
@@ -247,6 +247,7 @@ BOOL Randmix ()
|
||||
RMD160_CTX rctx;
|
||||
sha512_ctx sctx;
|
||||
sha256_ctx s256ctx;
|
||||
STREEBOG_CTX stctx;
|
||||
int poolIndex, digestIndex, digestSize;
|
||||
|
||||
switch (HashFunction)
|
||||
@@ -267,6 +268,10 @@ BOOL Randmix ()
|
||||
digestSize = WHIRLPOOL_DIGESTSIZE;
|
||||
break;
|
||||
|
||||
case STREEBOG:
|
||||
digestSize = STREEBOG_DIGESTSIZE;
|
||||
break;
|
||||
|
||||
default:
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
}
|
||||
@@ -303,6 +308,12 @@ BOOL Randmix ()
|
||||
WHIRLPOOL_finalize (&wctx, hashOutputBuffer);
|
||||
break;
|
||||
|
||||
case STREEBOG:
|
||||
STREEBOG_init (&stctx);
|
||||
STREEBOG_add (&stctx, pRandPool, RNG_POOL_SIZE);
|
||||
STREEBOG_finalize (&stctx, hashOutputBuffer);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
@@ -335,6 +346,10 @@ BOOL Randmix ()
|
||||
burn (&wctx, sizeof(wctx));
|
||||
break;
|
||||
|
||||
case STREEBOG:
|
||||
burn (&stctx, sizeof(sctx));
|
||||
break;
|
||||
|
||||
default:
|
||||
// Unknown/wrong ID
|
||||
TC_THROW_FATAL_EXCEPTION;
|
||||
|
||||
Reference in New Issue
Block a user