diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-01-11 16:41:55 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-01-13 00:26:51 +0800 |
commit | 1abee99eafab67fb1c98f9ecfc43cd5735384a86 (patch) | |
tree | 9f560f2e39beaae21e1331e139bc294f4b3ffd43 /arch/arm64/crypto/Kconfig | |
parent | 81edb42629758bacdf813dd5e4542ae26e3ad73a (diff) | |
download | linux-1abee99eafab67fb1c98f9ecfc43cd5735384a86.tar.gz linux-1abee99eafab67fb1c98f9ecfc43cd5735384a86.tar.bz2 linux-1abee99eafab67fb1c98f9ecfc43cd5735384a86.zip |
crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64
This is a reimplementation of the NEON version of the bit-sliced AES
algorithm. This code is heavily based on Andy Polyakov's OpenSSL version
for ARM, which is also available in the kernel. This is an alternative for
the existing NEON implementation for arm64 authored by me, which suffers
from poor performance due to its reliance on the pathologically slow four
register variant of the tbl/tbx NEON instruction.
This version is about ~30% (*) faster than the generic C code, but only in
cases where the input can be 8x interleaved (this is a fundamental property
of bit slicing). For this reason, only the chaining modes ECB, XTS and CTR
are implemented. (The significance of ECB is that it could potentially be
used by other chaining modes)
* Measured on Cortex-A57. Note that this is still an order of magnitude
slower than the implementations that use the dedicated AES instructions
introduced in ARMv8, but those are part of an optional extension, and so
it is good to have a fallback.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/crypto/Kconfig')
-rw-r--r-- | arch/arm64/crypto/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig index 0826f8e599a6..5de75c3dcbd4 100644 --- a/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig @@ -82,4 +82,11 @@ config CRYPTO_CHACHA20_NEON select CRYPTO_BLKCIPHER select CRYPTO_CHACHA20 +config CRYPTO_AES_ARM64_BS + tristate "AES in ECB/CBC/CTR/XTS modes using bit-sliced NEON algorithm" + depends on KERNEL_MODE_NEON + select CRYPTO_BLKCIPHER + select CRYPTO_AES_ARM64 + select CRYPTO_SIMD + endif |