VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index b40a41cd..092c8c6f 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -4336,56 +4336,50 @@ static BOOL PerformBenchmark(HWND hwndDlg)
{
EncryptDataUnits (lpTestBuffer, &startDataUnitNo, (TC_LARGEST_COMPILER_UINT) benchmarkBufferSize / ENCRYPTION_DATA_UNIT_SIZE, ci);
DecryptDataUnits (lpTestBuffer, &startDataUnitNo, (TC_LARGEST_COMPILER_UINT) benchmarkBufferSize / ENCRYPTION_DATA_UNIT_SIZE, ci);
}
}
}
#endif
#if HASH_FNC_BENCHMARKS
/* Measures the speed at which each of the hash algorithms processes the message to produce
a single digest.
The hash algorithm benchmarks are included here for development purposes only. Do not enable
them when building a public release (the benchmark GUI strings wouldn't make sense). */
{
BYTE *digest [MAX_DIGESTSIZE];
WHIRLPOOL_CTX wctx;
RMD160_CTX rctx;
- sha1_ctx sctx;
sha512_ctx s2ctx;
int hid;
for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
{
if (QueryPerformanceCounter (&performanceCountStart) == 0)
goto counter_error;
switch (hid)
{
- case SHA1:
- sha1_begin (&sctx);
- sha1_hash (lpTestBuffer, benchmarkBufferSize, &sctx);
- sha1_end ((unsigned char *) digest, &sctx);
- break;
case SHA512:
sha512_begin (&s2ctx);
sha512_hash (lpTestBuffer, benchmarkBufferSize, &s2ctx);
sha512_end ((unsigned char *) digest, &s2ctx);
break;
case RIPEMD160:
RMD160Init(&rctx);
RMD160Update(&rctx, lpTestBuffer, benchmarkBufferSize);
RMD160Final((unsigned char *) digest, &rctx);
break;
case WHIRLPOOL:
WHIRLPOOL_init (&wctx);
WHIRLPOOL_add (lpTestBuffer, benchmarkBufferSize * 8, &wctx);
WHIRLPOOL_finalize (&wctx, (unsigned char *) digest);
break;
}
@@ -4407,44 +4401,40 @@ static BOOL PerformBenchmark(HWND hwndDlg)
/* Measures the time that it takes for the PKCS-5 routine to derive a header key using
each of the implemented PRF algorithms.
The PKCS-5 benchmarks are included here for development purposes only. Do not enable
them when building a public release (the benchmark GUI strings wouldn't make sense). */
{
int thid, i;
char dk[MASTER_KEYDATA_SIZE];
char *tmp_salt = {"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"};
for (thid = FIRST_PRF_ID; thid <= LAST_PRF_ID; thid++)
{
if (QueryPerformanceCounter (&performanceCountStart) == 0)
goto counter_error;
for (i = 1; i <= 5; i++)
{
switch (thid)
{
- case SHA1:
- /* PKCS-5 test with HMAC-SHA-1 used as the PRF */
- derive_key_sha1 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
- break;
case SHA512:
/* PKCS-5 test with HMAC-SHA-512 used as the PRF */
derive_key_sha512 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
break;
case RIPEMD160:
/* PKCS-5 test with HMAC-RIPEMD-160 used as the PRF */
derive_key_ripemd160 (FALSE, "passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
break;
case WHIRLPOOL:
/* PKCS-5 test with HMAC-Whirlpool used as the PRF */
derive_key_whirlpool ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
break;
}
}
if (QueryPerformanceCounter (&performanceCountEnd) == 0)
goto counter_error;