Fixed AES encryption algorithm bug

PR:             kern/38465
Obtained from:  Ramana Yarlagadda <ramana.yarlagadda@analog.com>
This commit is contained in:
suz 2002-05-24 07:26:17 +00:00
parent c2f2a6104f
commit 869c418b27

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];