diff --git a/rijndael-simd.cpp b/rijndael-simd.cpp index 06c65ea0..32203978 100644 --- a/rijndael-simd.cpp +++ b/rijndael-simd.cpp @@ -771,7 +771,7 @@ void Rijndael_UncheckedSetKeyRev_AESNI(word32 *key, unsigned int rounds) typedef __vector unsigned char uint8x16_p8; typedef __vector unsigned long long uint64x2_p8; -void ByteReverseArray(byte src[16]) +void ReverseByteArrayLE(byte src[16]) { #if defined(CRYPTOPP_XLC_VERSION) && defined(IS_LITTLE_ENDIAN) vec_st(vec_reve(vec_ld(0, src)), 0, src); @@ -854,7 +854,7 @@ static inline uint64x2_p8 Load64x2(int off, const uint8_t src[16]) return (uint64x2_p8)vec_xl_be(off, (uint8_t*)src); #else # if defined(IS_LITTLE_ENDIAN) - return Reverse64x2((uint64x2_p8)vec_vsx_ld(off, src)); + return (uint64x2_p8)Reverse8x16(vec_vsx_ld(off, src)); # else return (uint64x2_p8)vec_vsx_ld(off, src); # endif diff --git a/rijndael.cpp b/rijndael.cpp index 94085ac1..704779e4 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -251,7 +251,7 @@ extern size_t Rijndael_Dec_AdvancedProcessBlocks_ARMV8(const word32 *subkeys, si #endif #if (CRYPTOPP_POWER8_AES_AVAILABLE) -extern void ByteReverseArray(byte src[16]); +extern void ReverseByteArrayLE(byte src[16]); extern size_t Rijndael_Enc_AdvancedProcessBlocks_POWER8(const word32 *subkeys, size_t rounds, const byte *inBlocks, const byte *xorBlocks, byte *outBlocks, size_t length, word32 flags); @@ -329,7 +329,7 @@ void Rijndael::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLen, c // reversed on little-endian systems to ensure it loads properly. byte * ptr = reinterpret_cast(rk); for (unsigned int i=0; i<=m_rounds; i++) - ByteReverseArray(ptr+i*16); + ReverseByteArrayLE(ptr+i*16); #endif // IS_LITTLE_ENDIAN return;