diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-10-14 17:14:54 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-11-08 23:23:53 +0100 |
commit | 68f16dae244752e8bdf112e8feeb6a0839088a3e (patch) | |
tree | 94b1f5ab11b4d08661d838704bf08c14eb2e46a4 /src/Common/Dlgcode.c | |
parent | f38cf0b6943da24c802424f53588b54aada48fd8 (diff) | |
download | VeraCrypt-68f16dae244752e8bdf112e8feeb6a0839088a3e.tar.gz VeraCrypt-68f16dae244752e8bdf112e8feeb6a0839088a3e.zip |
Implement support for creating and booting encrypted partition using SHA-256. Support SHA-256 for normal volumes as well.
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r-- | src/Common/Dlgcode.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index ffb62ecb..c19e1992 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c @@ -4363,6 +4363,7 @@ static BOOL PerformBenchmark(HWND hwndDlg) WHIRLPOOL_CTX wctx;
RMD160_CTX rctx;
sha512_ctx s2ctx;
+ sha256_ctx s256ctx;
int hid;
for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
@@ -4379,6 +4380,12 @@ static BOOL PerformBenchmark(HWND hwndDlg) sha512_end ((unsigned char *) digest, &s2ctx);
break;
+ case SHA256:
+ sha256_begin (&s256ctx);
+ sha256_hash (lpTestBuffer, benchmarkBufferSize, &s256ctx);
+ sha256_end ((unsigned char *) digest, &s256ctx);
+ break;
+
case RIPEMD160:
RMD160Init(&rctx);
RMD160Update(&rctx, lpTestBuffer, benchmarkBufferSize);
@@ -4433,6 +4440,11 @@ static BOOL PerformBenchmark(HWND hwndDlg) derive_key_sha512 ("passphrase-1234567890", 21, tmp_salt, 64, get_pkcs5_iteration_count(thid, FALSE), dk, MASTER_KEYDATA_SIZE);
break;
+ case SHA256:
+ /* PKCS-5 test with HMAC-SHA-256 used as the PRF */
+ derive_key_sha256 ("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);
|