crypto: x86/aes-xts - add AES-XTS assembly macro for modern CPUs
authorEric Biggers <ebiggers@google.com>
Fri, 29 Mar 2024 08:03:50 +0000 (01:03 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 5 Apr 2024 07:46:33 +0000 (15:46 +0800)
commitd6371688101223a355860d2eff51907e1aea984e
treec66b678590b10da9b7bd9c374cd41b776d792c76
parent7d4700d16186b9295d1419625c822cfa1d27fb7b
crypto: x86/aes-xts - add AES-XTS assembly macro for modern CPUs

Add an assembly file aes-xts-avx-x86_64.S which contains a macro that
expands into AES-XTS implementations for x86_64 CPUs that support at
least AES-NI and AVX, optionally also taking advantage of VAES,
VPCLMULQDQ, and AVX512 or AVX10.

This patch doesn't expand the macro at all.  Later patches will do so,
adding each implementation individually so that the motivation and use
case for each individual implementation can be fully presented.

The file also provides a function aes_xts_encrypt_iv() which handles the
encryption of the IV (tweak), using AES-NI and AVX.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/Makefile
arch/x86/crypto/aes-xts-avx-x86_64.S [new file with mode: 0644]