summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorEric Biggers2019-03-13 06:12:46 +0100
committerHerbert Xu2019-03-22 13:57:27 +0100
commit580e295178402d14bbf598a5702f8e01fc59dbaa (patch)
tree1c577fecbb63b68d096bb384ab4f81a8c367ec1e /include/crypto
parentcrypto: chacha-generic - fix use as arm64 no-NEON fallback (diff)
downloadkernel-qcow2-linux-580e295178402d14bbf598a5702f8e01fc59dbaa.tar.gz
kernel-qcow2-linux-580e295178402d14bbf598a5702f8e01fc59dbaa.tar.xz
kernel-qcow2-linux-580e295178402d14bbf598a5702f8e01fc59dbaa.zip
crypto: arm64/gcm-aes-ce - fix no-NEON fallback code
The arm64 gcm-aes-ce algorithm is failing the extra crypto self-tests following my patches to test the !may_use_simd() code paths, which previously were untested. The problem is that in the !may_use_simd() case, an odd number of AES blocks can be processed within each step of the skcipher_walk. However, the skcipher_walk is being done with a "stride" of 2 blocks and is advanced by an even number of blocks after each step. This causes the encryption to produce the wrong ciphertext and authentication tag, and causes the decryption to incorrectly fail. Fix it by only processing an even number of blocks per step. Fixes: c2b24c36e0a3 ("crypto: arm64/aes-gcm-ce - fix scatterwalk API violation") Fixes: 71e52c278c54 ("crypto: arm64/aes-ce-gcm - operate on two input blocks at a time") Cc: <stable@vger.kernel.org> # v4.19+ 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>
Diffstat (limited to 'include/crypto')
0 files changed, 0 insertions, 0 deletions