Skip to content

Commit 746b2e0

Browse files
ardbiesheuvelherbertx
authored andcommitted
crypto: lib - tidy up lib/crypto Kconfig and Makefile
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>
1 parent 20cc01b commit 746b2e0

3 files changed

Lines changed: 24 additions & 20 deletions

File tree

‎crypto/Kconfig‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,6 @@ config CRYPTO_SHA1_PPC_SPE
895895
SHA-1 secure hash standard (DFIPS 180-4) implemented
896896
using powerpc SPE SIMD instruction set.
897897

898-
config CRYPTO_LIB_SHA256
899-
tristate
900-
901898
config CRYPTO_SHA256
902899
tristate "SHA224 and SHA256 digest algorithm"
903900
select CRYPTO_HASH
@@ -1036,9 +1033,6 @@ config CRYPTO_GHASH_CLMUL_NI_INTEL
10361033

10371034
comment "Ciphers"
10381035

1039-
config CRYPTO_LIB_AES
1040-
tristate
1041-
10421036
config CRYPTO_AES
10431037
tristate "AES cipher algorithms"
10441038
select CRYPTO_ALGAPI
@@ -1167,9 +1161,6 @@ config CRYPTO_ANUBIS
11671161
<https://www.cosic.esat.kuleuven.be/nessie/reports/>
11681162
<http://www.larc.usp.br/~pbarreto/AnubisPage.html>
11691163

1170-
config CRYPTO_LIB_ARC4
1171-
tristate
1172-
11731164
config CRYPTO_ARC4
11741165
tristate "ARC4 cipher algorithm"
11751166
select CRYPTO_SKCIPHER
@@ -1357,9 +1348,6 @@ config CRYPTO_CAST6_AVX_X86_64
13571348
This module provides the Cast6 cipher algorithm that processes
13581349
eight blocks parallel using the AVX instruction set.
13591350

1360-
config CRYPTO_LIB_DES
1361-
tristate
1362-
13631351
config CRYPTO_DES
13641352
tristate "DES and Triple DES EDE cipher algorithms"
13651353
select CRYPTO_ALGAPI
@@ -1864,6 +1852,7 @@ config CRYPTO_STATS
18641852
config CRYPTO_HASH_INFO
18651853
bool
18661854

1855+
source "lib/crypto/Kconfig"
18671856
source "drivers/crypto/Kconfig"
18681857
source "crypto/asymmetric_keys/Kconfig"
18691858
source "certs/Kconfig"

‎lib/crypto/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
comment "Crypto library routines"
4+
5+
config CRYPTO_LIB_AES
6+
tristate
7+
8+
config CRYPTO_LIB_ARC4
9+
tristate
10+
11+
config CRYPTO_LIB_DES
12+
tristate
13+
14+
config CRYPTO_LIB_SHA256
15+
tristate

‎lib/crypto/Makefile‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
4-
libaes-y := aes.o
3+
obj-$(CONFIG_CRYPTO_LIB_AES) += libaes.o
4+
libaes-y := aes.o
55

6-
obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
7-
libarc4-y := arc4.o
6+
obj-$(CONFIG_CRYPTO_LIB_ARC4) += libarc4.o
7+
libarc4-y := arc4.o
88

9-
obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
10-
libdes-y := des.o
9+
obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o
10+
libdes-y := des.o
1111

12-
obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
13-
libsha256-y := sha256.o
12+
obj-$(CONFIG_CRYPTO_LIB_SHA256) += libsha256.o
13+
libsha256-y := sha256.o

0 commit comments

Comments
 (0)