VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-21 01:16:21 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-21 01:39:57 +0200
commitf3db66f37f6f763fbab314f2e72f2106957c04e8 (patch)
treed0784c703fc509bab0e5b67ea27df1116bd210d6
parent1217728214cfda9983c49cb9c0ed2f967476c478 (diff)
downloadVeraCrypt-f3db66f37f6f763fbab314f2e72f2106957c04e8.tar.gz
VeraCrypt-f3db66f37f6f763fbab314f2e72f2106957c04e8.zip
Windows: don't use AVX optimized Camellia in EFI bootloader until compatibility issues are investigated
-rw-r--r--src/Crypto/Camellia.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Crypto/Camellia.c b/src/Crypto/Camellia.c
index 5bca2623..f74130cd 100644
--- a/src/Crypto/Camellia.c
+++ b/src/Crypto/Camellia.c
@@ -1095,7 +1095,7 @@ void camellia_decrypt(const unsigned __int8 *inBlock, unsigned __int8 *outBlock
void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
{
-
+#if !defined (_UEFI)
if (IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */
{
while (blockCount >= 16)
@@ -1106,6 +1106,7 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
blockCount -= 16;
}
}
+#endif
while (blockCount >= 2)
{
@@ -1121,6 +1122,7 @@ void camellia_encrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte* out_blk, uint32 blockCount)
{
+#if !defined (_UEFI)
if (IsCpuIntel() && IsAesHwCpuSupported () && HasSAVX()) /* on AMD cpu, AVX is too slow */
{
while (blockCount >= 16)
@@ -1131,6 +1133,7 @@ void camellia_decrypt_blocks(unsigned __int8 *instance, const byte* in_blk, byte
blockCount -= 16;
}
}
+#endif
while (blockCount >= 2)
{