Fixed AES encryption algorithm bug

PR:             kern/38465
Obtained from:  Ramana Yarlagadda <ramana.yarlagadda@analog.com>
This commit is contained in:
SUZUKI Shinsuke 2002-05-24 07:26:17 +00:00
parent ce78cbf9e0
commit db49169620
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97231

View File

@ -125,6 +125,7 @@ int rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key,
for (i = numBlocks - 1; i > 0; i--) {
#if 1 /*STRICT_ALIGN*/
bcopy(outBuffer, block, 16);
bcopy(input, iv, 16);
((word32*)block)[0] ^= ((word32*)iv)[0];
((word32*)block)[1] ^= ((word32*)iv)[1];
((word32*)block)[2] ^= ((word32*)iv)[2];