VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-08 17:02:50 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-17 16:40:26 (GMT)
commit5547a605bd6a1aaa3e17903f9192cc923042c088 (patch)
tree6bbba3d3e5fc03da44216576ad3dfe6d5ae58fe2
parent0ac40097200985a64665ac8f7c0dd66ce5157988 (diff)
downloadVeraCrypt-5547a605bd6a1aaa3e17903f9192cc923042c088.zip
VeraCrypt-5547a605bd6a1aaa3e17903f9192cc923042c088.tar.gz
Windows EFI: don't use optimized Serpent implementation for EFI bootloader because lack of C++ support in EDKII framework
-rw-r--r--src/Common/Crypto.c6
-rw-r--r--src/Common/Crypto.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index 49ccbde..f0b3759 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -232,7 +232,7 @@ void EncipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount)
KeRestoreFloatingPointState (&floatingPointState);
#endif
}
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI)
else if (cipher == SERPENT
&& (blockCount >= 4)
&& HasSSE2()
@@ -327,7 +327,7 @@ void DecipherBlocks (int cipher, void *dataPtr, void *ks, size_t blockCount)
KeRestoreFloatingPointState (&floatingPointState);
#endif
}
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI)
else if (cipher == SERPENT
&& (blockCount >= 4)
&& HasSSE2()
@@ -415,7 +415,7 @@ BOOL CipherSupportsIntraDataUnitParallelization (int cipher)
{
return (cipher == AES && IsAesHwCpuSupported())
|| (cipher == GOST89)
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE && !defined (_UEFI)
|| (cipher == SERPENT && HasSSE2())
#endif
;
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h
index d654b0c..8e8bace 100644
--- a/src/Common/Crypto.h
+++ b/src/Common/Crypto.h
@@ -193,7 +193,7 @@ typedef struct
#endif
#include "Aes_hw_cpu.h"
-#if !defined (TC_WINDOWS_BOOT)
+#if !defined (TC_WINDOWS_BOOT) && !defined (_UEFI)
# include "SerpentFast.h"
#else
# include "Serpent.h"