crypto: caam - update xts sector size for large input length
authorAndrei Botila <andrei.botila@nxp.com>
Fri, 28 Feb 2020 10:46:48 +0000 (12:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 06:00:49 +0000 (08:00 +0200)
commitcbf12bd2856cffade67191af36115ea9760ff2f8
tree27a4175b4ee96ac6fa91d596f9f3c1d75090081f
parent814a0291c0e09a4b7d13a53c8884b05f9d1adf85
crypto: caam - update xts sector size for large input length

[ Upstream commit 3f142b6a7b573bde6cff926f246da05652c61eb4 ]

Since in the software implementation of XTS-AES there is
no notion of sector every input length is processed the same way.
CAAM implementation has the notion of sector which causes different
results between the software implementation and the one in CAAM
for input lengths bigger than 512 bytes.
Increase sector size to maximum value on 16 bits.

Fixes: c6415a6016bf ("crypto: caam - add support for acipher xts(aes)")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Andrei Botila <andrei.botila@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/caam/caamalg_desc.c