Fold ConditionalByteReverse for non-Power8 paths

pull/484/merge
Jeffrey Walton 2017-09-21 19:17:42 -04:00
parent f763bf3da6
commit e43c0eee74
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 1 additions and 3 deletions

View File

@ -1160,9 +1160,7 @@ void Rijndael_UncheckedSetKey_POWER8(const byte* userKey, size_t keyLen, word32*
}
rk = rk_saved;
ConditionalByteReverse(BIG_ENDIAN_ORDER, rk, rk, 16);
ConditionalByteReverse(BIG_ENDIAN_ORDER, rk + rounds*4, rk + rounds*4, 16);
ConditionalByteReverse(BIG_ENDIAN_ORDER, rk+4, rk+4, (rounds-1)*16);
ConditionalByteReverse(BIG_ENDIAN_ORDER, rk, rk, (rounds+1)*16);
#if defined(IS_LITTLE_ENDIAN)
// VSX registers are big-endian. The entire subkey table must be byte