Commit fa229775 authored by Eric Biggers's avatar Eric Biggers
Browse files

lib/crypto: arm/aes: Migrate optimized code into library



Move the ARM optimized single-block AES en/decryption code into
lib/crypto/, wire it up to the AES library API, and remove the
superseded "aes-arm" crypto_cipher algorithm.

The result is that both the AES library and crypto_cipher APIs are now
optimized for ARM, whereas previously only crypto_cipher was (and the
optimizations weren't enabled by default, which this fixes as well).

Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20260112192035.10427-11-ebiggers@kernel.org


Signed-off-by: default avatarEric Biggers <ebiggers@kernel.org>
parent a2484474
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ CONFIG_CRYPTO_SELFTESTS=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_SEQIV=m
CONFIG_CRYPTO_GHASH_ARM_CE=m
CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES_ARM_BS=m
CONFIG_CRYPTO_AES_ARM_CE=m
# CONFIG_CRYPTO_HW is not set
+1 −1
Original line number Diff line number Diff line
@@ -1286,7 +1286,7 @@ CONFIG_CRYPTO_USER_API_SKCIPHER=m
CONFIG_CRYPTO_USER_API_RNG=m
CONFIG_CRYPTO_USER_API_AEAD=m
CONFIG_CRYPTO_GHASH_ARM_CE=m
CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_ARM_BS=m
CONFIG_CRYPTO_AES_ARM_CE=m
CONFIG_CRYPTO_DEV_SUN4I_SS=m
+1 −1
Original line number Diff line number Diff line
@@ -706,7 +706,7 @@ CONFIG_NLS_ISO8859_1=y
CONFIG_SECURITY=y
CONFIG_CRYPTO_MICHAEL_MIC=y
CONFIG_CRYPTO_GHASH_ARM_CE=m
CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_ARM_BS=m
CONFIG_CRYPTO_DEV_OMAP=m
CONFIG_CRYPTO_DEV_OMAP_SHAM=m
+1 −1
Original line number Diff line number Diff line
@@ -657,7 +657,7 @@ CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_AES_ARM=m
CONFIG_CRYPTO_AES=m
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
+0 −18
Original line number Diff line number Diff line
@@ -23,24 +23,6 @@ config CRYPTO_GHASH_ARM_CE
	  that is part of the ARMv8 Crypto Extensions, or a slower variant that
	  uses the vmull.p8 instruction that is part of the basic NEON ISA.

config CRYPTO_AES_ARM
	tristate "Ciphers: AES"
	select CRYPTO_ALGAPI
	select CRYPTO_AES
	help
	  Block ciphers: AES cipher algorithms (FIPS-197)

	  Architecture: arm

	  On ARM processors without the Crypto Extensions, this is the
	  fastest AES implementation for single blocks.  For multiple
	  blocks, the NEON bit-sliced implementation is usually faster.

	  This implementation may be vulnerable to cache timing attacks,
	  since it uses lookup tables.  However, as countermeasures it
	  disables IRQs and preloads the tables; it is hoped this makes
	  such attacks very difficult.

config CRYPTO_AES_ARM_BS
	tristate "Ciphers: AES, modes: ECB/CBC/CTR/XTS (bit-sliced NEON)"
	depends on KERNEL_MODE_NEON
Loading