]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: aegis - Switch from crypto_ft_tab[] to aes_enc_tab[]
authorEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:20:05 +0000 (11:20 -0800)
committerEric Biggers <ebiggers@kernel.org>
Mon, 12 Jan 2026 19:39:58 +0000 (11:39 -0800)
Instead of crypto_ft_tab[0] from aes_generic.c, use aes_enc_tab from
lib/crypto/aes.c.  These contain the same data, so the result is the
same.  This will allow aes_generic.c to eventually be removed.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260112192035.10427-8-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
crypto/Kconfig
crypto/aegis.h

index 12a87f7cf1502fc89955f1dc2a2805604b56348e..443fe8e016fd5bb302f2baab42ae140121f2380a 100644 (file)
@@ -766,7 +766,7 @@ menu "AEAD (authenticated encryption with associated data) ciphers"
 config CRYPTO_AEGIS128
        tristate "AEGIS-128"
        select CRYPTO_AEAD
-       select CRYPTO_AES  # for AES S-box tables
+       select CRYPTO_LIB_AES  # for AES S-box tables
        help
          AEGIS-128 AEAD algorithm
 
index 6ef9c174c973d1eb50f8e47dd016bce5722f6b59..ffcf8e85ea696cefafe74fdadac45616fb3d2f21 100644 (file)
@@ -62,7 +62,7 @@ static __always_inline void crypto_aegis_aesenc(union aegis_block *dst,
                                                const union aegis_block *key)
 {
        const u8  *s  = src->bytes;
-       const u32 *t = crypto_ft_tab[0];
+       const u32 *t = aes_enc_tab;
        u32 d0, d1, d2, d3;
 
        d0 = t[s[ 0]] ^ rol32(t[s[ 5]], 8) ^ rol32(t[s[10]], 16) ^ rol32(t[s[15]], 24);