From 81a272b046e649873569309a10104b682f44b308 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 12 Sep 2017 00:30:48 -0400 Subject: [PATCH] Update comments --- rijndael.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rijndael.cpp b/rijndael.cpp index 25d172a0..e5079d9b 100644 --- a/rijndael.cpp +++ b/rijndael.cpp @@ -356,16 +356,15 @@ void Rijndael::Base::UncheckedSetKey(const byte *userKey, unsigned int keyLen, c { ConditionalByteReverse(BIG_ENDIAN_ORDER, rk+4, rk+4, (m_rounds-1)*16); +#if defined(IS_LITTLE_ENDIAN) // VSX registers are big-endian. The entire subkey table must be byte - // reversed on little-endian systems to ensure it loads properly. - // I believe we should do this when msr.le=1, but I can't find an - // intrinsic to access the machine status register. In the meantime - // we will do it anytime IS_LITTLE_ENDIAN is true. + // reversed on little-endian systems to ensure it loads properly. byte * ptr = reinterpret_cast(rk); for (unsigned int i=0; i<=m_rounds; i++) ByteReverseArrayLE(ptr+i*16); +#endif // IS_LITTLE_ENDIAN } -#endif +#endif // CRYPTOPP_POWER8_AES_AVAILABLE } void Rijndael::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const