crypto: arm64/aes - fix handling sub-block CTS-CBC inputs
authorEric Biggers <ebiggers@google.com>
Wed, 3 Oct 2018 05:22:15 +0000 (22:22 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 8 Oct 2018 05:47:02 +0000 (13:47 +0800)
commit7ff9036a62053995ff4bc7048dc176bdf9135d96
treea4582f031118ea34465dd2383a7e0b07956a1333
parent52813ab249590595e43c8b03227adaa29ceceb33
crypto: arm64/aes - fix handling sub-block CTS-CBC inputs

In the new arm64 CTS-CBC implementation, return an error code rather
than crashing on inputs shorter than AES_BLOCK_SIZE bytes.  Also set
cra_blocksize to AES_BLOCK_SIZE (like is done in the cts template) to
indicate the minimum input size.

Fixes: dd597fb33ff0 ("crypto: arm64/aes-blk - add support for CTS-CBC mode")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-glue.c