]> git.karo-electronics.de Git - karo-tx-linux.git/commit
crypto: arm/aes - replace bit-sliced OpenSSL NEON code
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 11 Jan 2017 16:41:54 +0000 (16:41 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jan 2017 10:27:31 +0000 (18:27 +0800)
commitcc477bf645736739e69d31fdf715281ef0dd5f9b
treed84910c90cbd3d60d78871a1a4ee61a0d5ffbff1
parent1abee99eafab67fb1c98f9ecfc43cd5735384a86
crypto: arm/aes - replace bit-sliced OpenSSL NEON code

This replaces the unwieldy generated implementation of bit-sliced AES
in CBC/CTR/XTS modes that originated in the OpenSSL project with a
new version that is heavily based on the OpenSSL implementation, but
has a number of advantages over the old version:
- it does not rely on the scalar AES cipher that also originated in the
  OpenSSL project and contains redundant lookup tables and key schedule
  generation routines (which we already have in crypto/aes_generic.)
- it uses the same expanded key schedule for encryption and decryption,
  reducing the size of the per-key data structure by 1696 bytes
- it adds an implementation of AES in ECB mode, which can be wrapped by
  other generic chaining mode implementations
- it moves the handling of corner cases that are non critical to performance
  to the glue layer written in C
- it was written directly in assembler rather than generated from a Perl
  script

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/Kconfig
arch/arm/crypto/Makefile
arch/arm/crypto/aes-armv4.S [deleted file]
arch/arm/crypto/aes-neonbs-core.S [new file with mode: 0644]
arch/arm/crypto/aes-neonbs-glue.c [new file with mode: 0644]
arch/arm/crypto/aes_glue.h [deleted file]
arch/arm/crypto/aesbs-core.S_shipped [deleted file]
arch/arm/crypto/aesbs-glue.c [deleted file]
arch/arm/crypto/bsaes-armv7.pl [deleted file]