From f3db66f37f6f763fbab314f2e72f2106957c04e8 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 21 Jun 2017 01:16:21 +0200 Subject: Windows: don't use AVX optimized Camellia in EFI bootloader until compatibility issues are investigated --- src/Crypto/Camellia.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3