]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/aes-ce - fix for big endian
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 11 Oct 2016 18:15:13 +0000 (19:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 03:03:42 +0000 (11:03 +0800)
commitfa50c901ce1fc5f7626440717b3c05452c3e5422
tree6dd1173576fe6ce4c9d49087e39b3dcea4afbc22
parent608c9a0debcdc901225079a25a301df37ed9c9cb
crypto: arm64/aes-ce - fix for big endian

The core AES cipher implementation that uses ARMv8 Crypto Extensions
instructions erroneously loads the round keys as 64-bit quantities,
which causes the algorithm to fail when built for big endian. In
addition, the key schedule generation routine fails to take endianness
into account as well, when loading the combining the input key with
the round constants. So fix both issues.

Fixes: a2b23ac35a59 ("arm64/crypto: use crypto instructions to generate AES key schedule")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-ce-cipher.c