crypto: algif_skcipher - Use chunksize instead of blocksize
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 10 Sep 2019 01:42:05 +0000 (11:42 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2020 18:48:46 +0000 (19:48 +0100)
commitd7835f2b853bae5f6c0edf8bffc1eeff9c858e86
treee983b78410b7531b4210fb83b68797f4dd2ac776
parentea3506e4297276842ca39f0a987dbe757b32a41d
crypto: algif_skcipher - Use chunksize instead of blocksize

commit 5b0fe9552336338acb52756daf65dd7a4eeca73f upstream.

When algif_skcipher does a partial operation it always process data
that is a multiple of blocksize.  However, for algorithms such as
CTR this is wrong because even though it can process any number of
bytes overall, the partial block must come at the very end and not
in the middle.

This is exactly what chunksize is meant to describe so this patch
changes blocksize to chunksize.

Fixes: 8ff590903d5f ("crypto: algif_skcipher - User-space...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/algif_skcipher.c
include/crypto/internal/skcipher.h
include/crypto/skcipher.h