Skip to content

Commit e56e189

Browse files
jmflinuxtxzx2c4
authored andcommitted
lib/crypto: add prompts back to crypto libraries
Commit 6048fdc ("lib/crypto: blake2s: include as built-in") took away a number of prompt texts from other crypto libraries. This makes values flip from built-in to module when oldconfig runs, and causes problems when these crypto libs need to be built in for thingslike BIG_KEYS. Fixes: 6048fdc ("lib/crypto: blake2s: include as built-in") Cc: Herbert Xu <[email protected]> Cc: [email protected] Signed-off-by: Justin M. Forbes <[email protected]> [Jason: - moved menu into submenu of lib/ instead of root menu - fixed chacha sub-dependencies for CONFIG_CRYPTO] Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent fe81ba1 commit e56e189

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

crypto/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,5 +1928,3 @@ source "crypto/asymmetric_keys/Kconfig"
19281928
source "certs/Kconfig"
19291929

19301930
endif # if CRYPTO
1931-
1932-
source "lib/crypto/Kconfig"

lib/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ config INDIRECT_IOMEM_FALLBACK
122122
mmio accesses when the IO memory address is not a registered
123123
emulated region.
124124

125+
source "lib/crypto/Kconfig"
126+
125127
config CRC_CCITT
126128
tristate "CRC-CCITT functions"
127129
help

lib/crypto/Kconfig

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

3+
menu "Crypto library routines"
4+
35
config CRYPTO_LIB_AES
46
tristate
57

@@ -31,7 +33,7 @@ config CRYPTO_ARCH_HAVE_LIB_CHACHA
3133

3234
config CRYPTO_LIB_CHACHA_GENERIC
3335
tristate
34-
select CRYPTO_ALGAPI
36+
select XOR_BLOCKS
3537
help
3638
This symbol can be depended upon by arch implementations of the
3739
ChaCha library interface that require the generic code as a
@@ -40,7 +42,8 @@ config CRYPTO_LIB_CHACHA_GENERIC
4042
of CRYPTO_LIB_CHACHA.
4143

4244
config CRYPTO_LIB_CHACHA
43-
tristate
45+
tristate "ChaCha library interface"
46+
depends on CRYPTO
4447
depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
4548
select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
4649
help
@@ -65,7 +68,7 @@ config CRYPTO_LIB_CURVE25519_GENERIC
6568
of CRYPTO_LIB_CURVE25519.
6669

6770
config CRYPTO_LIB_CURVE25519
68-
tristate
71+
tristate "Curve25519 scalar multiplication library"
6972
depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
7073
select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
7174
help
@@ -100,7 +103,7 @@ config CRYPTO_LIB_POLY1305_GENERIC
100103
of CRYPTO_LIB_POLY1305.
101104

102105
config CRYPTO_LIB_POLY1305
103-
tristate
106+
tristate "Poly1305 library interface"
104107
depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
105108
select CRYPTO_LIB_POLY1305_GENERIC if CRYPTO_ARCH_HAVE_LIB_POLY1305=n
106109
help
@@ -109,14 +112,18 @@ config CRYPTO_LIB_POLY1305
109112
is available and enabled.
110113

111114
config CRYPTO_LIB_CHACHA20POLY1305
112-
tristate
115+
tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
113116
depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
114117
depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
118+
depends on CRYPTO
115119
select CRYPTO_LIB_CHACHA
116120
select CRYPTO_LIB_POLY1305
121+
select CRYPTO_ALGAPI
117122

118123
config CRYPTO_LIB_SHA256
119124
tristate
120125

121126
config CRYPTO_LIB_SM4
122127
tristate
128+
129+
endmenu

0 commit comments

Comments
 (0)