]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: x86/aes-gcm - Use new AES library API
authorEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:20:23 +0000 (11:20 -0800)
committerEric Biggers <ebiggers@kernel.org>
Thu, 15 Jan 2026 22:09:08 +0000 (14:09 -0800)
commit104a9526e1448dc45b96534e2d78d41b3ecac3f9
treeca80040c15cd998ee832211a94e88b3cea19dbc0
parent370960c153db82fbdd55539be4d4eb41ef3a7e40
crypto: x86/aes-gcm - Use new AES library API

Switch from the old AES library functions (which use struct
crypto_aes_ctx) to the new ones (which use struct aes_enckey).  This
eliminates the unnecessary computation and caching of the decryption
round keys.  The new AES en/decryption functions are also much faster
and use AES instructions when supported by the CPU.

Since this changes the format of the AES-GCM key structures that are
used by the AES-GCM assembly code, the offsets in the assembly code had
to be updated to match.  Note that the new key structures are smaller,
since the decryption round keys are no longer unnecessarily included.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260112192035.10427-26-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
arch/x86/crypto/aes-gcm-aesni-x86_64.S
arch/x86/crypto/aes-gcm-vaes-avx2.S
arch/x86/crypto/aes-gcm-vaes-avx512.S
arch/x86/crypto/aesni-intel_glue.c