e32e18a3577431008042791b0a9678e9584d83ad
[openwrt/staging/ldir.git] /
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
5
6 commit 746b2e024c67aa605ac12d135cd7085a49cf9dc4 upstream.
7
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.
10
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>
14 ---
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
20
21 --- a/crypto/Kconfig
22 +++ b/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.
26
27 -config CRYPTO_LIB_SHA256
28 - tristate
29 -
30 config CRYPTO_SHA256
31 tristate "SHA224 and SHA256 digest algorithm"
32 select CRYPTO_HASH
33 @@ -1019,9 +1016,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
34
35 comment "Ciphers"
36
37 -config CRYPTO_LIB_AES
38 - tristate
39 -
40 config CRYPTO_AES
41 tristate "AES cipher algorithms"
42 select CRYPTO_ALGAPI
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>
46
47 -config CRYPTO_LIB_ARC4
48 - tristate
49 -
50 config CRYPTO_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.
56
57 -config CRYPTO_LIB_DES
58 - tristate
59 -
60 config CRYPTO_DES
61 tristate "DES and Triple DES EDE cipher algorithms"
62 select CRYPTO_ALGAPI
63 @@ -1845,6 +1833,7 @@ config CRYPTO_STATS
64 config CRYPTO_HASH_INFO
65 bool
66
67 +source "lib/crypto/Kconfig"
68 source "drivers/crypto/Kconfig"
69 source "crypto/asymmetric_keys/Kconfig"
70 source "certs/Kconfig"
71 --- /dev/null
72 +++ b/lib/crypto/Kconfig
73 @@ -0,0 +1,15 @@
74 +# SPDX-License-Identifier: GPL-2.0
75 +
76 +comment "Crypto library routines"
77 +
78 +config CRYPTO_LIB_AES
79 + tristate
80 +
81 +config CRYPTO_LIB_ARC4
82 + tristate
83 +
84 +config CRYPTO_LIB_DES
85 + tristate
86 +
87 +config CRYPTO_LIB_SHA256
88 + tristate
89 --- a/lib/crypto/Makefile
90 +++ b/lib/crypto/Makefile
91 @@ -1,13 +1,13 @@
92 # SPDX-License-Identifier: GPL-2.0
93
94 -obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
95 -libaes-y := aes.o
96 +obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
97 +libaes-y := aes.o
98
99 -obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
100 -libarc4-y := arc4.o
101 +obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
102 +libarc4-y := arc4.o
103
104 -obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
105 -libdes-y := des.o
106 +obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
107 +libdes-y := des.o
108
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