Skip to content

Commit

Permalink
crypto: cast5/avx - fix storing of new IV in CBC encryption
Browse files Browse the repository at this point in the history
cast5/avx incorrectly XORs new IV over old IV at end of CBC encryption
function when it should store. This causes CBC encryption to give
incorrect output on multi-page encryption requests.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Jussi Kivilinna authored and Herbert Xu committed Sep 27, 2012
1 parent 54216bb commit 200429c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/crypto/cast5_avx_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static unsigned int __cbc_encrypt(struct blkcipher_desc *desc,
nbytes -= bsize;
} while (nbytes >= bsize);

*(u64 *)walk->iv ^= *iv;
*(u64 *)walk->iv = *iv;
return nbytes;
}

Expand Down

0 comments on commit 200429c

Please sign in to comment.