diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-09-19 11:24:57 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-27 07:50:40 (GMT) |
commit | 200429cc63399e99dd2abcdca5088559a911ef2b (patch) | |
tree | 9a17c3a9f4ae6e0968545ff944f1a49f65558bae /arch/x86 | |
parent | 54216bbd76aa394c93a9e92c0a2e3b314391b134 (diff) | |
download | linux-fsl-qoriq-200429cc63399e99dd2abcdca5088559a911ef2b.tar.xz |
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')
-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 445aab0..e0ea14f 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; } |