crypto: lib/poly1305 - remove INTERNAL symbol and selection of CRYPTO
authorEric Biggers <ebiggers@google.com>
Tue, 22 Apr 2025 15:27:16 +0000 (08:27 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Apr 2025 11:40:54 +0000 (19:40 +0800)
Now that the architecture-optimized Poly1305 kconfig symbols are defined
regardless of CRYPTO, there is no need for CRYPTO_LIB_POLY1305 to select
CRYPTO.  So, remove that.  This makes the indirection through the
CRYPTO_LIB_POLY1305_INTERNAL symbol unnecessary, so get rid of that and
just use CRYPTO_LIB_POLY1305 directly.  Finally, make the fallback to
the generic implementation use a default value instead of a select; this
makes it consistent with how the arch-optimized code gets enabled and
also with how CRYPTO_LIB_BLAKE2S_GENERIC gets enabled.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/lib/crypto/Kconfig
arch/arm64/lib/crypto/Kconfig
arch/mips/lib/crypto/Kconfig
arch/powerpc/lib/crypto/Kconfig
arch/x86/lib/crypto/Kconfig
crypto/Kconfig
lib/crypto/Kconfig

index 5d10bd13fc8df3308e7c5f2e46c5103b08061c38..e8444fd0aae3036e859ecba0a3bcc3eb5fd7c511 100644 (file)
@@ -20,5 +20,5 @@ config CRYPTO_CHACHA20_NEON
 
 config CRYPTO_POLY1305_ARM
        tristate
-       default CRYPTO_LIB_POLY1305_INTERNAL
+       default CRYPTO_LIB_POLY1305
        select CRYPTO_ARCH_HAVE_LIB_POLY1305
index 2a8ff7cfc08d3d9b5280531258fe3905e12b89be..0b903ef524d8574d3c82268f4219c1b0e593bd60 100644 (file)
@@ -10,5 +10,5 @@ config CRYPTO_CHACHA20_NEON
 config CRYPTO_POLY1305_NEON
        tristate
        depends on KERNEL_MODE_NEON
-       default CRYPTO_LIB_POLY1305_INTERNAL
+       default CRYPTO_LIB_POLY1305
        select CRYPTO_ARCH_HAVE_LIB_POLY1305
index 454354e30d76ce3a675f993c15c5db8d08a56a4f..0670a170c1be04959ceadcceba75f86187a05b08 100644 (file)
@@ -8,5 +8,5 @@ config CRYPTO_CHACHA_MIPS
 
 config CRYPTO_POLY1305_MIPS
        tristate
-       default CRYPTO_LIB_POLY1305_INTERNAL
+       default CRYPTO_LIB_POLY1305
        select CRYPTO_ARCH_HAVE_LIB_POLY1305
index 6627d28cd24e0a46a490cfad17faabcd39db6385..bf6d0ab22c27d3eaea1da4881094591beff2aa36 100644 (file)
@@ -10,6 +10,6 @@ config CRYPTO_CHACHA20_P10
 config CRYPTO_POLY1305_P10
        tristate
        depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
-       default CRYPTO_LIB_POLY1305_INTERNAL
+       default CRYPTO_LIB_POLY1305
        select CRYPTO_ARCH_HAVE_LIB_POLY1305
        select CRYPTO_LIB_POLY1305_GENERIC
index e44403d9677f596dcb44c75f67c0f0038c46a8f8..546fe2afe0b51e62623fd38280600724fc6a60d4 100644 (file)
@@ -22,5 +22,5 @@ config CRYPTO_CHACHA20_X86_64
 config CRYPTO_POLY1305_X86_64
        tristate
        depends on 64BIT
-       default CRYPTO_LIB_POLY1305_INTERNAL
+       default CRYPTO_LIB_POLY1305
        select CRYPTO_ARCH_HAVE_LIB_POLY1305
index 832af6363951f8ebe27242d625ada31df9212adc..9878286d1d6830be44dfe1006f0481e2937dce47 100644 (file)
@@ -956,8 +956,8 @@ config CRYPTO_POLYVAL
 config CRYPTO_POLY1305
        tristate "Poly1305"
        select CRYPTO_HASH
+       select CRYPTO_LIB_POLY1305
        select CRYPTO_LIB_POLY1305_GENERIC
-       select CRYPTO_LIB_POLY1305_INTERNAL
        help
          Poly1305 authenticator algorithm (RFC7539)
 
index c6ab724c1dbd9dec48e38ab931282b5d0e700162..af2368799579f90dfdcb320b02b1606ba3e246ab 100644 (file)
@@ -114,21 +114,15 @@ config CRYPTO_ARCH_HAVE_LIB_POLY1305
 
 config CRYPTO_LIB_POLY1305_GENERIC
        tristate
+       default CRYPTO_LIB_POLY1305 if !CRYPTO_ARCH_HAVE_LIB_POLY1305
        help
-         This symbol can be depended upon by arch implementations of the
-         Poly1305 library interface that require the generic code as a
-         fallback, e.g., for SIMD implementations. If no arch specific
-         implementation is enabled, this implementation serves the users
-         of CRYPTO_LIB_POLY1305.
-
-config CRYPTO_LIB_POLY1305_INTERNAL
-       tristate
-       select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
+         This symbol can be selected by arch implementations of the Poly1305
+         library interface that require the generic code as a fallback, e.g.,
+         for SIMD implementations. If no arch specific implementation is
+         enabled, this implementation serves the users of CRYPTO_LIB_POLY1305.
 
 config CRYPTO_LIB_POLY1305
        tristate
-       select CRYPTO
-       select CRYPTO_LIB_POLY1305_INTERNAL
        help
          Enable the Poly1305 library interface. This interface may be fulfilled
          by either the generic implementation or an arch-specific one, if one