Debian Codegraph @

lib/crypto/Kconfig

raw
1 # SPDX-License-Identifier: GPL-2.0
2
3 config CRYPTO_HASH_INFO
4 bool
5
6 config CRYPTO_LIB_UTILS
7 tristate
8
9 config CRYPTO_LIB_AES
10 tristate
11 select CRYPTO_LIB_UTILS
12
13 config CRYPTO_LIB_AES_ARCH
14 bool
15 depends on CRYPTO_LIB_AES && !UML && !KMSAN
16 default y if ARM
17 default y if ARM64
18 default y if PPC && (SPE || (PPC64 && VSX))
19 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
20 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
21 default y if S390
22 default y if SPARC64
23 default y if X86
24
25 config CRYPTO_LIB_AESCFB
26 tristate
27 select CRYPTO_LIB_AES
28 select CRYPTO_LIB_UTILS
29
30 config CRYPTO_LIB_AES_CBC_MACS
31 tristate
32 select CRYPTO_LIB_AES
33 help
34 The AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC library functions. Select
35 this if your module uses any of the functions from
36 <crypto/aes-cbc-macs.h>.
37
38 config CRYPTO_LIB_AESGCM
39 tristate
40 select CRYPTO_LIB_AES
41 select CRYPTO_LIB_GF128HASH
42 select CRYPTO_LIB_UTILS
43
44 config CRYPTO_LIB_ARC4
45 tristate
46
47 config CRYPTO_LIB_GF128MUL
48 tristate
49
50 config CRYPTO_LIB_BLAKE2B
51 tristate
52 help
53 The BLAKE2b library functions. Select this if your module uses any of
54 the functions from <crypto/blake2b.h>.
55
56 config CRYPTO_LIB_BLAKE2B_ARCH
57 bool
58 depends on CRYPTO_LIB_BLAKE2B && !UML
59 default y if ARM && KERNEL_MODE_NEON
60
61 # BLAKE2s support is always built-in, so there's no CRYPTO_LIB_BLAKE2S option.
62
63 config CRYPTO_LIB_BLAKE2S_ARCH
64 bool
65 depends on !UML
66 default y if ARM
67 default y if X86_64
68
69 config CRYPTO_LIB_CHACHA
70 tristate
71 select CRYPTO_LIB_UTILS
72 help
73 Enable the ChaCha library interface. Select this if your module uses
74 chacha_crypt() or hchacha_block().
75
76 config CRYPTO_LIB_CHACHA_ARCH
77 bool
78 depends on CRYPTO_LIB_CHACHA && !UML && !KMSAN
79 default y if ARM
80 default y if ARM64
81 default y if MIPS && CPU_MIPS32_R2
82 default y if PPC64 && CPU_LITTLE_ENDIAN && VSX
83 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
84 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
85 default y if S390
86 default y if X86_64
87
88 config CRYPTO_LIB_CURVE25519
89 tristate
90 select CRYPTO_LIB_UTILS
91 help
92 The Curve25519 library functions. Select this if your module uses any
93 of the functions from <crypto/curve25519.h>.
94
95 config CRYPTO_LIB_CURVE25519_ARCH
96 bool
97 depends on CRYPTO_LIB_CURVE25519 && !UML && !KMSAN
98 default y if ARM && KERNEL_MODE_NEON && !CPU_BIG_ENDIAN
99 default y if PPC64 && CPU_LITTLE_ENDIAN
100 default y if X86_64
101
102 config CRYPTO_LIB_CURVE25519_GENERIC
103 bool
104 depends on CRYPTO_LIB_CURVE25519
105 default y if !CRYPTO_LIB_CURVE25519_ARCH || ARM || X86_64
106
107 config CRYPTO_LIB_DES
108 tristate
109
110 config CRYPTO_LIB_GF128HASH
111 tristate
112 help
113 The GHASH and POLYVAL library functions. Select this if your module
114 uses any of the functions from <crypto/gf128hash.h>.
115
116 config CRYPTO_LIB_GF128HASH_ARCH
117 bool
118 depends on CRYPTO_LIB_GF128HASH && !UML
119 default y if ARM && KERNEL_MODE_NEON
120 default y if ARM64
121 default y if PPC64 && VSX
122 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
123 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
124 default y if S390
125 default y if X86_64
126
127 config CRYPTO_LIB_MD5
128 tristate
129 help
130 The MD5 and HMAC-MD5 library functions. Select this if your module
131 uses any of the functions from <crypto/md5.h>.
132
133 config CRYPTO_LIB_MD5_ARCH
134 bool
135 depends on CRYPTO_LIB_MD5 && !UML
136 default y if PPC
137
138 config CRYPTO_LIB_MLDSA
139 tristate
140 select CRYPTO_LIB_SHA3
141 help
142 The ML-DSA library functions. Select this if your module uses any of
143 the functions from <crypto/mldsa.h>.
144
145 config CRYPTO_LIB_NH
146 tristate
147 help
148 Implementation of the NH almost-universal hash function, specifically
149 the variant of NH used in Adiantum.
150
151 config CRYPTO_LIB_NH_ARCH
152 bool
153 depends on CRYPTO_LIB_NH && !UML && !KMSAN
154 default y if ARM && KERNEL_MODE_NEON
155 default y if ARM64
156 default y if X86_64
157
158 config CRYPTO_LIB_POLY1305
159 tristate
160 help
161 The Poly1305 library functions. Select this if your module uses any
162 of the functions from <crypto/poly1305.h>.
163
164 config CRYPTO_LIB_POLY1305_ARCH
165 bool
166 depends on CRYPTO_LIB_POLY1305 && !UML && !KMSAN
167 default y if ARM
168 default y if ARM64
169 default y if MIPS
170 # The PPC64 code needs to be fixed to work in softirq context.
171 default y if PPC64 && CPU_LITTLE_ENDIAN && VSX && BROKEN
172 default y if RISCV
173 default y if X86_64
174
175 # This symbol controls the inclusion of the Poly1305 generic code. This differs
176 # from most of the other algorithms, which handle the generic code
177 # "automatically" via __maybe_unused. This is needed so that the Adiantum code,
178 # which calls the poly1305_core_*() functions directly, can enable them.
179 config CRYPTO_LIB_POLY1305_GENERIC
180 bool
181 depends on CRYPTO_LIB_POLY1305
182 # Enable if there's no arch impl or the arch impl requires the generic
183 # impl as a fallback. (Or if selected explicitly.)
184 default y if !CRYPTO_LIB_POLY1305_ARCH || PPC64
185
186 config CRYPTO_LIB_POLY1305_RSIZE
187 int
188 default 2 if MIPS || RISCV
189 default 11 if X86_64
190 default 9 if ARM || ARM64
191 default 1
192
193 config CRYPTO_LIB_CHACHA20POLY1305
194 tristate
195 select CRYPTO_LIB_CHACHA
196 select CRYPTO_LIB_POLY1305
197 select CRYPTO_LIB_UTILS
198
199 config CRYPTO_LIB_SHA1
200 tristate
201 help
202 The SHA-1 and HMAC-SHA1 library functions. Select this if your module
203 uses any of the functions from <crypto/sha1.h>.
204
205 config CRYPTO_LIB_SHA1_ARCH
206 bool
207 depends on CRYPTO_LIB_SHA1 && !UML
208 default y if ARM
209 default y if ARM64
210 default y if MIPS && CPU_CAVIUM_OCTEON
211 default y if PPC
212 default y if S390
213 default y if SPARC64
214 default y if X86_64
215
216 config CRYPTO_LIB_SHA256
217 tristate
218 help
219 The SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256 library functions.
220 Select this if your module uses any of these functions from
221 <crypto/sha2.h>.
222
223 config CRYPTO_LIB_SHA256_ARCH
224 bool
225 depends on CRYPTO_LIB_SHA256 && !UML
226 default y if ARM && !CPU_V7M
227 default y if ARM64
228 default y if MIPS && CPU_CAVIUM_OCTEON
229 default y if PPC && SPE
230 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
231 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
232 default y if S390
233 default y if SPARC64
234 default y if X86_64
235
236 config CRYPTO_LIB_SHA512
237 tristate
238 help
239 The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions.
240 Select this if your module uses any of these functions from
241 <crypto/sha2.h>.
242
243 config CRYPTO_LIB_SHA512_ARCH
244 bool
245 depends on CRYPTO_LIB_SHA512 && !UML
246 default y if ARM && !CPU_V7M
247 default y if ARM64
248 default y if MIPS && CPU_CAVIUM_OCTEON
249 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
250 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
251 default y if S390
252 default y if SPARC64
253 default y if X86_64
254
255 config CRYPTO_LIB_SHA3
256 tristate
257 select CRYPTO_LIB_UTILS
258 help
259 The SHA3 library functions. Select this if your module uses any of
260 the functions from <crypto/sha3.h>.
261
262 config CRYPTO_LIB_SHA3_ARCH
263 bool
264 depends on CRYPTO_LIB_SHA3 && !UML
265 default y if ARM64
266 default y if S390
267
268 config CRYPTO_LIB_SM3
269 tristate
270 help
271 The SM3 library functions. Select this if your module uses any of the
272 functions from <crypto/sm3.h>.
273
274 config CRYPTO_LIB_SM3_ARCH
275 bool
276 depends on CRYPTO_LIB_SM3 && !UML
277 default y if ARM64
278 default y if RISCV && 64BIT && TOOLCHAIN_HAS_VECTOR_CRYPTO && \
279 RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS
280 default y if X86_64