]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Oct 2019 15:04:31 +0000 (01:04 +1000)
commitada29a2d9c816a02d8731ddf6e98c1b2918d49ca
tree7d2d1d608bf78d1944add60e1b77deadadde903e
parentb02477b74fe36e8f704e19e1ceb23bd89f7a8212
crypto: algif_skcipher - Use chunksize instead of blocksize

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: b285ae43087f ("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>
crypto/algif_skcipher.c
include/crypto/internal/skcipher.h
include/crypto/skcipher.h