summaryrefslogtreecommitdiff
path: root/crypto/ecc.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-01-03 20:16:10 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-11 14:16:57 +0800
commitac4ceaab9fb05b5d461e57d39afbfef1321e06f2 (patch)
treed1247a0bf508c87135848702a236b0ddd7a01bfe /crypto/ecc.c
parent380f1e0d7a348689bec2facbd4ac07a507ba78af (diff)
downloadlinux-crypto-ac4ceaab9fb05b5d461e57d39afbfef1321e06f2.tar.gz
linux-crypto-ac4ceaab9fb05b5d461e57d39afbfef1321e06f2.zip
crypto: cfb - add missing 'chunksize' property
Like some other block cipher mode implementations, the CFB implementation assumes that while walking through the scatterlist, a partial block does not occur until the end. But the walk is incorrectly being done with a blocksize of 1, as 'cra_blocksize' is set to 1 (since CFB is a stream cipher) but no 'chunksize' is set. This bug causes incorrect encryption/decryption for some scatterlist layouts. Fix it by setting the 'chunksize'. Also extend the CFB test vectors to cover this bug as well as cases where the message length is not a multiple of the block size. Fixes: df5fcebba63e ("crypto: cfb - add support for Cipher FeedBack mode") Cc: <stable@vger.kernel.org> # v4.17+ Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc.c')
0 files changed, 0 insertions, 0 deletions