提交 99dcd45f 编写于 作者: D Dmitry Eremin-Solenikov 提交者: Greg Kroah-Hartman

crypto: cfb - fix decryption

commit fa4600734b74f74d9169c3015946d4722f8bcf79 upstream.

crypto_cfb_decrypt_segment() incorrectly XOR'ed generated keystream with
IV, rather than with data stream, resulting in incorrect decryption.
Test vectors will be added in the next patch.
Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d8e4b24f
...@@ -144,7 +144,7 @@ static int crypto_cfb_decrypt_segment(struct skcipher_walk *walk, ...@@ -144,7 +144,7 @@ static int crypto_cfb_decrypt_segment(struct skcipher_walk *walk,
do { do {
crypto_cfb_encrypt_one(tfm, iv, dst); crypto_cfb_encrypt_one(tfm, iv, dst);
crypto_xor(dst, iv, bsize); crypto_xor(dst, src, bsize);
iv = src; iv = src;
src += bsize; src += bsize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册