hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/lib/crypto/Kconfig
....@@ -1,31 +1,28 @@
11 # SPDX-License-Identifier: GPL-2.0
22
3
-comment "Crypto library routines"
3
+menu "Crypto library routines"
4
+
5
+config CRYPTO_LIB_AES
6
+ tristate
7
+
8
+config CRYPTO_LIB_ARC4
9
+ tristate
410
511 config CRYPTO_ARCH_HAVE_LIB_BLAKE2S
6
- tristate
12
+ bool
713 help
814 Declares whether the architecture provides an arch-specific
915 accelerated implementation of the Blake2s library interface,
1016 either builtin or as a module.
1117
1218 config CRYPTO_LIB_BLAKE2S_GENERIC
13
- tristate
19
+ def_bool !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
1420 help
1521 This symbol can be depended upon by arch implementations of the
1622 Blake2s library interface that require the generic code as a
1723 fallback, e.g., for SIMD implementations. If no arch specific
1824 implementation is enabled, this implementation serves the users
1925 of CRYPTO_LIB_BLAKE2S.
20
-
21
-config CRYPTO_LIB_BLAKE2S
22
- tristate "BLAKE2s hash function library"
23
- depends on CRYPTO_ARCH_HAVE_LIB_BLAKE2S || !CRYPTO_ARCH_HAVE_LIB_BLAKE2S
24
- select CRYPTO_LIB_BLAKE2S_GENERIC if CRYPTO_ARCH_HAVE_LIB_BLAKE2S=n
25
- help
26
- Enable the Blake2s library interface. This interface may be fulfilled
27
- by either the generic implementation or an arch-specific one, if one
28
- is available and enabled.
2926
3027 config CRYPTO_ARCH_HAVE_LIB_CHACHA
3128 tristate
....@@ -36,7 +33,6 @@
3633
3734 config CRYPTO_LIB_CHACHA_GENERIC
3835 tristate
39
- select CRYPTO_ALGAPI
4036 help
4137 This symbol can be depended upon by arch implementations of the
4238 ChaCha library interface that require the generic code as a
....@@ -46,12 +42,42 @@
4642
4743 config CRYPTO_LIB_CHACHA
4844 tristate "ChaCha library interface"
45
+ depends on CRYPTO
4946 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
5047 select CRYPTO_LIB_CHACHA_GENERIC if CRYPTO_ARCH_HAVE_LIB_CHACHA=n
5148 help
5249 Enable the ChaCha library interface. This interface may be fulfilled
5350 by either the generic implementation or an arch-specific one, if one
5451 is available and enabled.
52
+
53
+config CRYPTO_ARCH_HAVE_LIB_CURVE25519
54
+ tristate
55
+ help
56
+ Declares whether the architecture provides an arch-specific
57
+ accelerated implementation of the Curve25519 library interface,
58
+ either builtin or as a module.
59
+
60
+config CRYPTO_LIB_CURVE25519_GENERIC
61
+ tristate
62
+ help
63
+ This symbol can be depended upon by arch implementations of the
64
+ Curve25519 library interface that require the generic code as a
65
+ fallback, e.g., for SIMD implementations. If no arch specific
66
+ implementation is enabled, this implementation serves the users
67
+ of CRYPTO_LIB_CURVE25519.
68
+
69
+config CRYPTO_LIB_CURVE25519
70
+ tristate "Curve25519 scalar multiplication library"
71
+ depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
72
+ select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
73
+ select LIB_MEMNEQ
74
+ help
75
+ Enable the Curve25519 library interface. This interface may be
76
+ fulfilled by either the generic implementation or an arch-specific
77
+ one, if one is available and enabled.
78
+
79
+config CRYPTO_LIB_DES
80
+ tristate
5581
5682 config CRYPTO_LIB_POLY1305_RSIZE
5783 int
....@@ -85,34 +111,16 @@
85111 by either the generic implementation or an arch-specific one, if one
86112 is available and enabled.
87113
88
-config CRYPTO_ARCH_HAVE_LIB_CURVE25519
89
- tristate
90
- help
91
- Declares whether the architecture provides an arch-specific
92
- accelerated implementation of the Curve25519 library interface,
93
- either builtin or as a module.
94
-
95
-config CRYPTO_LIB_CURVE25519_GENERIC
96
- tristate
97
- help
98
- This symbol can be depended upon by arch implementations of the
99
- Curve25519 library interface that require the generic code as a
100
- fallback, e.g., for SIMD implementations. If no arch specific
101
- implementation is enabled, this implementation serves the users
102
- of CRYPTO_LIB_CURVE25519.
103
-
104
-config CRYPTO_LIB_CURVE25519
105
- tristate "Curve25519 scalar multiplication library"
106
- depends on CRYPTO_ARCH_HAVE_LIB_CURVE25519 || !CRYPTO_ARCH_HAVE_LIB_CURVE25519
107
- select CRYPTO_LIB_CURVE25519_GENERIC if CRYPTO_ARCH_HAVE_LIB_CURVE25519=n
108
- help
109
- Enable the Curve25519 library interface. This interface may be
110
- fulfilled by either the generic implementation or an arch-specific
111
- one, if one is available and enabled.
112
-
113114 config CRYPTO_LIB_CHACHA20POLY1305
114115 tristate "ChaCha20-Poly1305 AEAD support (8-byte nonce library version)"
115116 depends on CRYPTO_ARCH_HAVE_LIB_CHACHA || !CRYPTO_ARCH_HAVE_LIB_CHACHA
116117 depends on CRYPTO_ARCH_HAVE_LIB_POLY1305 || !CRYPTO_ARCH_HAVE_LIB_POLY1305
118
+ depends on CRYPTO
117119 select CRYPTO_LIB_CHACHA
118120 select CRYPTO_LIB_POLY1305
121
+ select CRYPTO_ALGAPI
122
+
123
+config CRYPTO_LIB_SHA256
124
+ tristate
125
+
126
+endmenu