Update comments

pull/507/head
Jeffrey Walton 2017-09-12 00:30:48 -04:00
parent 7fb34e9b08
commit 81a272b046
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 4 additions and 5 deletions

View File

@ -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.
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