diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-09-19 13:24:57 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-27 09:50:40 +0200 |
commit | 200429cc63399e99dd2abcdca5088559a911ef2b (patch) | |
tree | 9a17c3a9f4ae6e0968545ff944f1a49f65558bae /arch | |
parent | crypto: tcrypt - add missing tests for camellia and ghash (diff) | |
download | linux-200429cc63399e99dd2abcdca5088559a911ef2b.tar.xz linux-200429cc63399e99dd2abcdca5088559a911ef2b.zip |
crypto: cast5/avx - fix storing of new IV in CBC encryption
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/crypto/cast5_avx_glue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c index 445aab06387b..e0ea14f9547f 100644 --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c @@ -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; } |