diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-09-12 00:30:48 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-09-12 00:30:48 -0400 |
commit | 81a272b046e649873569309a10104b682f44b308 (patch) | |
tree | d7faba7d9ccff5e5b947e43c550b7b6cb82197bf /rijndael.cpp | |
parent | 7fb34e9b0894ccb091550e0b9457b72f0920abea (diff) | |
download | cryptopp-git-81a272b046e649873569309a10104b682f44b308.tar.gz |
Update comments
Diffstat (limited to 'rijndael.cpp')
-rw-r--r-- | rijndael.cpp | 9 |
1 files 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<byte*>(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
|