• Dave Watson's avatar
    crypto: aesni - support 256 byte keys in avx asm · 5350b0f5
    Dave Watson authored
    Add support for 192/256-bit keys using the avx gcm/aes routines.
    The sse routines were previously updated in e31ac32d (Add support
    for 192 & 256 bit keys to AESNI RFC4106).
    
    Instead of adding an additional loop in the hotpath as in e31ac32d,
    this diff instead generates separate versions of the code using macros,
    and the entry routines choose which version once.   This results
    in a 5% performance improvement vs. adding a loop to the hot path.
    This is the same strategy chosen by the intel isa-l_crypto library.
    
    The key size checks are removed from the c code where appropriate.
    
    Note that this diff depends on using gcm_context_data - 256 bit keys
    require 16 HashKeys + 15 expanded keys, which is larger than
    struct crypto_aes_ctx, so they are stored in struct gcm_context_data.
    Signed-off-by: default avatarDave Watson <davejwatson@fb.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    5350b0f5
aesni-intel_glue.c 42.9 KB