• Ard Biesheuvel's avatar
    crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64 · 1abee99e
    Ard Biesheuvel authored
    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: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    1abee99e
Makefile 2.23 KB