diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-10-20 02:01:52 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-09 17:38:45 +0100 |
commit | 99dcd45f274e10b0a4b04f2836218762ed2294d4 (patch) | |
tree | fb4c174af62c42f247f801ffb3af98d5c7323887 /crypto | |
parent | d8e4b24ffbbbc296e521eebd5525a3031bdbac51 (diff) | |
download | linux-stable-99dcd45f274e10b0a4b04f2836218762ed2294d4.tar.gz linux-stable-99dcd45f274e10b0a4b04f2836218762ed2294d4.tar.bz2 linux-stable-99dcd45f274e10b0a4b04f2836218762ed2294d4.zip |
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: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cfb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cfb.c b/crypto/cfb.c index 20987d0e09d8..e81e45673498 100644 --- a/crypto/cfb.c +++ b/crypto/cfb.c @@ -144,7 +144,7 @@ static int crypto_cfb_decrypt_segment(struct skcipher_walk *walk, do { crypto_cfb_encrypt_one(tfm, iv, dst); - crypto_xor(dst, iv, bsize); + crypto_xor(dst, src, bsize); iv = src; src += bsize; |