diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-09-19 07:24:57 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-27 03:50:40 -0400 |
commit | 200429cc63399e99dd2abcdca5088559a911ef2b (patch) | |
tree | 9a17c3a9f4ae6e0968545ff944f1a49f65558bae /arch/x86/crypto | |
parent | 54216bbd76aa394c93a9e92c0a2e3b314391b134 (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')
-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, | |||
165 | nbytes -= bsize; | 165 | nbytes -= bsize; |
166 | } while (nbytes >= bsize); | 166 | } while (nbytes >= bsize); |
167 | 167 | ||
168 | *(u64 *)walk->iv ^= *iv; | 168 | *(u64 *)walk->iv = *iv; |
169 | return nbytes; | 169 | return nbytes; |
170 | } | 170 | } |
171 | 171 | ||