]> git.karo-electronics.de Git - karo-tx-linux.git/commit
crypto: arm/aes - replace scalar AES cipher
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 11 Jan 2017 16:41:53 +0000 (16:41 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Jan 2017 16:26:50 +0000 (00:26 +0800)
commit81edb42629758bacdf813dd5e4542ae26e3ad73a
treecc4e010ac2132c4a01094f43350716010868a9f1
parentbed593c0e852f5c1efd3ca4e984fd744c51cf6ee
crypto: arm/aes - replace scalar AES cipher

This replaces the scalar AES cipher that originates in the OpenSSL project
with a new implementation that is ~15% (*) faster (on modern cores), and
reuses the lookup tables and the key schedule generation routines from the
generic C implementation (which is usually compiled in anyway due to
networking and other subsystems depending on it).

Note that the bit sliced NEON code for AES still depends on the scalar cipher
that this patch replaces, so it is not removed entirely yet.

* On Cortex-A57, the performance increases from 17.0 to 14.9 cycles per byte
  for 128-bit keys.

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-cipher-core.S [new file with mode: 0644]
arch/arm/crypto/aes-cipher-glue.c [new file with mode: 0644]
arch/arm/crypto/aes_glue.c [deleted file]