• Ard Biesheuvel's avatar
    crypto: arm64/aes - add scalar implementation · bed593c0
    Ard Biesheuvel authored
    This adds a scalar implementation of AES, based on the precomputed tables
    that are exposed by the generic AES code. Since rotates are cheap on arm64,
    this implementation only uses the 4 core tables (of 1 KB each), and avoids
    the prerotated ones, reducing the D-cache footprint by 75%.
    
    On Cortex-A57, this code manages 13.0 cycles per byte, which is ~34% faster
    than the generic C code. (Note that this is still >13x slower than the code
    that uses the optional ARMv8 Crypto Extensions, which manages <1 cycles per
    byte.)
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    bed593c0
aes-cipher-glue.c 1.87 KB