From 6d9cf6b31e45ab0e533122df774b91b5a887b3b8 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 16 Dec 2020 16:38:38 -0700 Subject: [PATCH] fix for wc_AesFeedbackCFB8() on big endian platforms --- wolfcrypt/src/aes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index f00743468..6cae25544 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -8588,6 +8588,9 @@ static int wc_AesFeedbackCFB8(Aes* aes, byte* out, const byte* in, } /* MSB + XOR */ + #ifdef BIG_ENDIAN_ORDER + ByteReverseWords(aes->tmp, aes->tmp, AES_BLOCK_SIZE); + #endif out[0] = aes->tmp[0] ^ in[0]; if (dir == AES_ENCRYPTION) { pt = (byte*)aes->reg;