aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/crypto/cast5_avx_glue.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2012-09-19 14:24:57 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2012-09-27 15:50:40 +0800
commit200429cc63399e99dd2abcdca5088559a911ef2b (patch)
tree9a17c3a9f4ae6e0968545ff944f1a49f65558bae /arch/x86/crypto/cast5_avx_glue.c
parent54216bbd76aa394c93a9e92c0a2e3b314391b134 (diff)
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/x86/crypto/cast5_avx_glue.c')
-rw-r--r--arch/x86/crypto/cast5_avx_glue.c2
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;
}