aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/aegis128-core.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-07-03 10:55:09 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-26 15:03:57 +1000
commit521cdde758bf331d4e264ef3deef5a26d5ce0b4f (patch)
treef356195f6c5753583c26d4d3512bc88508ae64ef /crypto/aegis128-core.c
parentcrypto: aegis128 - drop empty TFM init/exit routines (diff)
downloadlinux-dev-521cdde758bf331d4e264ef3deef5a26d5ce0b4f.tar.xz
linux-dev-521cdde758bf331d4e264ef3deef5a26d5ce0b4f.zip
crypto: aegis - avoid prerotated AES tables
The generic AES code provides four sets of lookup tables, where each set consists of four tables containing the same 32-bit values, but rotated by 0, 8, 16 and 24 bits, respectively. This makes sense for CISC architectures such as x86 which support memory operands, but for other architectures, the rotates are quite cheap, and using all four tables needlessly thrashes the D-cache, and actually hurts rather than helps performance. Since x86 already has its own implementation of AEGIS based on AES-NI instructions, let's tweak the generic implementation towards other architectures, and avoid the prerotated tables, and perform the rotations inline. On ARM Cortex-A53, this results in a ~8% speedup. Acked-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/aegis128-core.c')
0 files changed, 0 insertions, 0 deletions