VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Tests.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 02:07:32 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 02:11:21 +0200
commit546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b (patch)
tree7f8bfb3f7e7c6a0aab662fe6dec944cd6ee1a874 /src/Common/Tests.c
parentab7b5dc685eab3235dd748d8791cb39085ab0394 (diff)
downloadVeraCrypt-546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b.tar.gz
VeraCrypt-546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b.zip
Crypto: Add optimized SHA-512 and SHA-256 assembly implementations for x86_64 and x86. This improves speed by 30%.
Diffstat (limited to 'src/Common/Tests.c')
-rw-r--r--src/Common/Tests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Common/Tests.c b/src/Common/Tests.c
index cf0c8699..c70954a6 100644
--- a/src/Common/Tests.c
+++ b/src/Common/Tests.c
@@ -584,7 +584,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE)
#if defined (DEVICE_DRIVER) && !defined (_WIN64)
KFLOATING_SAVE floatingPointState;
NTSTATUS saveStatus = STATUS_SUCCESS;
- if (bUseSSE && (HasSSE2() || HasSSE41()))
+ if (bUseSSE && (HasISSE() || HasSSE2()))
saveStatus = KeSaveFloatingPointState (&floatingPointState);
#endif
while (vector[i].hexInput && vector[i].hexOutput)
@@ -601,7 +601,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE)
}
#if defined (DEVICE_DRIVER) && !defined (_WIN64)
- if (NT_SUCCESS (saveStatus) && bUseSSE && (HasSSE2() || HasSSE41()))
+ if (NT_SUCCESS (saveStatus) && bUseSSE && (HasISSE() || HasSSE2()))
KeRestoreFloatingPointState (&floatingPointState);
#endif