crypto: lib - tidy up lib/crypto Kconfig and Makefile
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Nov 2019 12:22:07 +0000 (13:22 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 01:02:38 +0000 (09:02 +0800)
In preparation of introducing a set of crypto library interfaces, tidy
up the Makefile and split off the Kconfig symbols into a separate file.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
lib/crypto/Kconfig [new file with mode: 0644]
lib/crypto/Makefile

index b021b6374d9e9e4262bd5993348991a3e83a8581..9def945e9549c6e60d2b1e836d0bff699e5ddf66 100644 (file)
@@ -895,9 +895,6 @@ config CRYPTO_SHA1_PPC_SPE
          SHA-1 secure hash standard (DFIPS 180-4) implemented
          using powerpc SPE SIMD instruction set.
 
-config CRYPTO_LIB_SHA256
-       tristate
-
 config CRYPTO_SHA256
        tristate "SHA224 and SHA256 digest algorithm"
        select CRYPTO_HASH
@@ -1036,9 +1033,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
 
 comment "Ciphers"
 
-config CRYPTO_LIB_AES
-       tristate
-
 config CRYPTO_AES
        tristate "AES cipher algorithms"
        select CRYPTO_ALGAPI
@@ -1167,9 +1161,6 @@ config CRYPTO_ANUBIS
          <https://www.cosic.esat.kuleuven.be/nessie/reports/>
          <http://www.larc.usp.br/~pbarreto/AnubisPage.html>
 
-config CRYPTO_LIB_ARC4
-       tristate
-
 config CRYPTO_ARC4
        tristate "ARC4 cipher algorithm"
        select CRYPTO_SKCIPHER
@@ -1357,9 +1348,6 @@ config CRYPTO_CAST6_AVX_X86_64
          This module provides the Cast6 cipher algorithm that processes
          eight blocks parallel using the AVX instruction set.
 
-config CRYPTO_LIB_DES
-       tristate
-
 config CRYPTO_DES
        tristate "DES and Triple DES EDE cipher algorithms"
        select CRYPTO_ALGAPI
@@ -1864,6 +1852,7 @@ config CRYPTO_STATS
 config CRYPTO_HASH_INFO
        bool
 
+source "lib/crypto/Kconfig"
 source "drivers/crypto/Kconfig"
 source "crypto/asymmetric_keys/Kconfig"
 source "certs/Kconfig"
diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig
new file mode 100644 (file)
index 0000000..2614300
--- /dev/null
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0
+
+comment "Crypto library routines"
+
+config CRYPTO_LIB_AES
+       tristate
+
+config CRYPTO_LIB_ARC4
+       tristate
+
+config CRYPTO_LIB_DES
+       tristate
+
+config CRYPTO_LIB_SHA256
+       tristate
index cbe0b6a6450d7536a942c9343b808a1665129886..63de4cb3fcf8255e35c4e7918c9fccd04823536c 100644 (file)
@@ -1,13 +1,13 @@
 # SPDX-License-Identifier: GPL-2.0
 
-obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
-libaes-y := aes.o
+obj-$(CONFIG_CRYPTO_LIB_AES)                   += libaes.o
+libaes-y                                       := aes.o
 
-obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
-libarc4-y := arc4.o
+obj-$(CONFIG_CRYPTO_LIB_ARC4)                  += libarc4.o
+libarc4-y                                      := arc4.o
 
-obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
-libdes-y := des.o
+obj-$(CONFIG_CRYPTO_LIB_DES)                   += libdes.o
+libdes-y                                       := des.o
 
-obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
-libsha256-y := sha256.o
+obj-$(CONFIG_CRYPTO_LIB_SHA256)                        += libsha256.o
+libsha256-y                                    := sha256.o