VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-04 00:07:21 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-04 00:26:26 (GMT)
commit0358eb6c717cfe132bcec7fddeac14213ed8937c (patch)
treea3fe6019b9a7216398bb8bd4d8cd2625ead273d7
parent89efcdb8cd95ea798187fe4062a73fa5d2fca456 (diff)
downloadVeraCrypt-0358eb6c717cfe132bcec7fddeac14213ed8937c.zip
VeraCrypt-0358eb6c717cfe132bcec7fddeac14213ed8937c.tar.gz
Don't check for SSSE3 to use 64-bit SHA-512 assembly code since it uses only SSE2 instructions.
-rw-r--r--src/Crypto/Sha2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c
index f4a44fb..505ebb0 100644
--- a/src/Crypto/Sha2.c
+++ b/src/Crypto/Sha2.c
@@ -217,7 +217,11 @@ void sha512_begin(sha512_ctx* ctx)
#endif
#if CRYPTOPP_BOOL_X64 || ((CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32) && !defined (TC_MACOSX))
+#if CRYPTOPP_BOOL_X64
+ if (HasSSE2())
+#else
if (HasSSSE3() && HasMMX())
+#endif
transfunc = SSE2Transform;
else
#endif