Re: [NEEDS-REVIEW] [RFC PATCH 7/8] crypto: x86/aes-kl - Support AES algorithm using Key Locker instructions

From: Dave Hansen
Date: Thu Dec 17 2020 - 15:59:43 EST


On 12/16/20 9:41 AM, Chang S. Bae wrote:
> +config CRYPTO_AES_KL
> + tristate "AES cipher algorithms (AES-KL)"
> + depends on X86_KEYLOCKER
> + select CRYPTO_AES_NI_INTEL
> + help
> + Use AES Key Locker instructions for AES algorithm.
> +
> + AES cipher algorithms (FIPS-197). AES uses the Rijndael
> + algorithm.
> +
> + Rijndael appears to be consistently a very good performer in both
> + hardware and software across a wide range of computing
> + environments regardless of its use in feedback or non-feedback
> + modes. Its key setup time is excellent, and its key agility is
> + good. Rijndael's very low memory requirements make it very well
> + suited for restricted-space environments, in which it also
> + demonstrates excellent performance. Rijndael's operations are
> + among the easiest to defend against power and timing attacks.
> +
> + The AES specifies three key sizes: 128, 192 and 256 bits
> +
> + See <http://csrc.nist.gov/encryption/aes/> for more information.
> +
> + For 128- and 256-bit keys, the AES cipher algorithm is
> + implemented by AES Key Locker instructions. This implementation
> + does not need an AES key once wrapped to an encoded form. For AES
> + compliance, 192-bit is processed by AES-NI instructions.

Giving a history lesson and high-level overview of AES doesn't quite
seem appropriate here, unless this is the first the kernel has seen of AES.