1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Ard Biesheuvel <ardb@kernel.org>
3 Date: Fri, 8 Nov 2019 13:22:07 +0100
4 Subject: [PATCH] crypto: lib - tidy up lib/crypto Kconfig and Makefile
6 commit 746b2e024c67aa605ac12d135cd7085a49cf9dc4 upstream.
8 In preparation of introducing a set of crypto library interfaces, tidy
9 up the Makefile and split off the Kconfig symbols into a separate file.
11 Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
12 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
13 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
15 crypto/Kconfig | 13 +------------
16 lib/crypto/Kconfig | 15 +++++++++++++++
17 lib/crypto/Makefile | 16 ++++++++--------
18 3 files changed, 24 insertions(+), 20 deletions(-)
19 create mode 100644 lib/crypto/Kconfig
23 @@ -878,9 +878,6 @@ config CRYPTO_SHA1_PPC_SPE
24 SHA-1 secure hash standard (DFIPS 180-4) implemented
25 using powerpc SPE SIMD instruction set.
27 -config CRYPTO_LIB_SHA256
31 tristate "SHA224 and SHA256 digest algorithm"
33 @@ -1019,9 +1016,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
37 -config CRYPTO_LIB_AES
41 tristate "AES cipher algorithms"
43 @@ -1150,9 +1144,6 @@ config CRYPTO_ANUBIS
44 <https://www.cosic.esat.kuleuven.be/nessie/reports/>
45 <http://www.larc.usp.br/~pbarreto/AnubisPage.html>
47 -config CRYPTO_LIB_ARC4
51 tristate "ARC4 cipher algorithm"
52 select CRYPTO_BLKCIPHER
53 @@ -1339,9 +1330,6 @@ config CRYPTO_CAST6_AVX_X86_64
54 This module provides the Cast6 cipher algorithm that processes
55 eight blocks parallel using the AVX instruction set.
57 -config CRYPTO_LIB_DES
61 tristate "DES and Triple DES EDE cipher algorithms"
63 @@ -1845,6 +1833,7 @@ config CRYPTO_STATS
64 config CRYPTO_HASH_INFO
67 +source "lib/crypto/Kconfig"
68 source "drivers/crypto/Kconfig"
69 source "crypto/asymmetric_keys/Kconfig"
70 source "certs/Kconfig"
72 +++ b/lib/crypto/Kconfig
74 +# SPDX-License-Identifier: GPL-2.0
76 +comment "Crypto library routines"
78 +config CRYPTO_LIB_AES
81 +config CRYPTO_LIB_ARC4
84 +config CRYPTO_LIB_DES
87 +config CRYPTO_LIB_SHA256
89 --- a/lib/crypto/Makefile
90 +++ b/lib/crypto/Makefile
92 # SPDX-License-Identifier: GPL-2.0
94 -obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
96 +obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
99 -obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
101 +obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
104 -obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
106 +obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
109 -obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
110 -libsha256-y := sha256.o
111 +obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
112 +libsha256-y := sha256.o