提交 c9f97a27 编写于 作者: J Jussi Kivilinna 提交者: 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: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册