VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-09 14:25:52 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-15 01:09:11 +0200
commite90e24b30b379752bf6531c663085de1d2a653d7 (patch)
tree6ff3a18a2e9dedb9e506d67f2c560e1c8f657e47 /src/Common/Dlgcode.c
parent0b2c8b09c6eb3ddce22fa88c34a640881f8f2177 (diff)
downloadVeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.tar.gz
VeraCrypt-e90e24b30b379752bf6531c663085de1d2a653d7.zip
Windows: Add support for Streebog (hash) and kuznyechik (encryption)
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 1ecc3c0a..31be6b90 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -5154,6 +5154,7 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
RMD160_CTX rctx;
sha512_ctx s2ctx;
sha256_ctx s256ctx;
+ STREEBOG_CTX stctx;
int hid, i;
@@ -5190,6 +5191,13 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
WHIRLPOOL_add (lpTestBuffer, benchmarkBufferSize, &wctx);
WHIRLPOOL_finalize (&wctx, (unsigned char *) digest);
break;
+
+ case STREEBOG:
+ STREEBOG_init(&stctx);
+ STREEBOG_add(&stctx, lpTestBuffer, benchmarkBufferSize);
+ STREEBOG_finalize(&stctx, (unsigned char *)digest);
+ break;
+
}
}
@@ -5249,6 +5257,11 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
/* PKCS-5 test with HMAC-Whirlpool used as the PRF */
derive_key_whirlpool ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, FALSE, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE);
break;
+
+ case STREEBOG:
+ /* PKCS-5 test with HMAC-STREEBOG used as the PRF */
+ derive_key_streebog("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, benchmarkPim, FALSE, benchmarkPreBoot), dk, MASTER_KEYDATA_SIZE);
+ break;
}
}
@@ -6612,7 +6625,12 @@ ResetCipherTest(HWND hwndDlg, int idTestCipher)
SetWindowText(GetDlgItem(hwndDlg, IDC_PLAINTEXT), L"0000000000000000");
SetWindowText(GetDlgItem(hwndDlg, IDC_CIPHERTEXT), L"0000000000000000");
- if (idTestCipher == AES || idTestCipher == SERPENT || idTestCipher == TWOFISH || idTestCipher == CAMELLIA)
+ if (idTestCipher == AES || idTestCipher == SERPENT || idTestCipher == TWOFISH || idTestCipher == CAMELLIA
+#if defined(CIPHER_GOST89)
+ || idTestCipher == GOST89
+#endif
+ || idTestCipher == KUZNYECHIK
+ )
{
ndx = (int) SendMessage (GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_ADDSTRING, 0,(LPARAM) L"256");
SendMessage(GetDlgItem(hwndDlg, IDC_KEY_SIZE), CB_SETITEMDATA, ndx,(LPARAM) 32);
@@ -10186,6 +10204,14 @@ void Applink (char *dest, BOOL bSendOS, char *extraOutput)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Twofish");
}
+ else if (strcmp(dest, "gost89") == 0)
+ {
+ StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=GOST89");
+ }
+ else if (strcmp(dest, "kuznyechik") == 0)
+ {
+ StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Kuznyechik");
+ }
else if (strcmp(dest, "camellia") == 0)
{
StringCbCopyA (url, sizeof (url),"https://veracrypt.codeplex.com/wikipage?title=Camellia");