Commit c9f97a27 authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by Herbert Xu

crypto: x86/glue_helper - fix storing of new IV in CBC encryption

Glue_helper 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: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 200429cc
...@@ -110,7 +110,7 @@ static unsigned int __glue_cbc_encrypt_128bit(const common_glue_func_t fn, ...@@ -110,7 +110,7 @@ static unsigned int __glue_cbc_encrypt_128bit(const common_glue_func_t fn,
nbytes -= bsize; nbytes -= bsize;
} while (nbytes >= bsize); } while (nbytes >= bsize);
u128_xor((u128 *)walk->iv, (u128 *)walk->iv, iv); *(u128 *)walk->iv = *iv;
return nbytes; return nbytes;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment