blob: aa82336ef146fb41cb99a4c592357e503f01296f [file] [log] [blame]
Raymond Mao87010c32024-10-03 14:50:15 -07001choice
2 prompt "Select crypto libraries"
3 default LEGACY_CRYPTO
4 help
5 Select crypto libraries.
6 LEGACY_CRYPTO for legacy crypto libraries,
7 MBEDTLS_LIB for MbedTLS libraries.
8
9config LEGACY_CRYPTO
10 bool "legacy crypto libraries"
11 select LEGACY_CRYPTO_BASIC
12 select LEGACY_CRYPTO_CERT
13
14config MBEDTLS_LIB
15 bool "MbedTLS libraries"
16 select MBEDTLS_LIB_X509
17endchoice
18
19if LEGACY_CRYPTO || MBEDTLS_LIB_CRYPTO_ALT
20
21config LEGACY_CRYPTO_BASIC
22 bool "legacy basic crypto libraries"
Raymond Maoa571b982024-10-03 14:50:16 -070023 select MD5_LEGACY if MD5
24 select SHA1_LEGACY if SHA1
25 select SHA256_LEGACY if SHA256
26 select SHA512_LEGACY if SHA512
27 select SHA384_LEGACY if SHA384
28 select SPL_MD5_LEGACY if SPL_MD5
29 select SPL_SHA1_LEGACY if SPL_SHA1
30 select SPL_SHA256_LEGACY if SPL_SHA256
31 select SPL_SHA512_LEGACY if SPL_SHA512
32 select SPL_SHA384_LEGACY if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -070033 help
34 Enable legacy basic crypto libraries.
35
Raymond Maoa571b982024-10-03 14:50:16 -070036if LEGACY_CRYPTO_BASIC
37
38config SHA1_LEGACY
39 bool "Enable SHA1 support with legacy crypto library"
40 depends on LEGACY_CRYPTO_BASIC && SHA1
41 help
42 This option enables support of hashing using SHA1 algorithm
43 with legacy crypto library.
44
45config SHA256_LEGACY
46 bool "Enable SHA256 support with legacy crypto library"
47 depends on LEGACY_CRYPTO_BASIC && SHA256
48 help
49 This option enables support of hashing using SHA256 algorithm
50 with legacy crypto library.
51
52config SHA512_LEGACY
53 bool "Enable SHA512 support with legacy crypto library"
54 depends on LEGACY_CRYPTO_BASIC && SHA512
55 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
56 help
57 This option enables support of hashing using SHA512 algorithm
58 with legacy crypto library.
59
60config SHA384_LEGACY
61 bool "Enable SHA384 support with legacy crypto library"
62 depends on LEGACY_CRYPTO_BASIC && SHA384
63 select SHA512_LEGACY
64 help
65 This option enables support of hashing using SHA384 algorithm
66 with legacy crypto library.
67
68config MD5_LEGACY
69 bool "Enable MD5 support with legacy crypto library"
70 depends on LEGACY_CRYPTO_BASIC && MD5
71 help
72 This option enables support of hashing using MD5 algorithm
73 with legacy crypto library.
74
75if SPL
76
77config SPL_SHA1_LEGACY
78 bool "Enable SHA1 support in SPL with legacy crypto library"
79 depends on LEGACY_CRYPTO_BASIC && SPL_SHA1
80 help
81 This option enables support of hashing using SHA1 algorithm
82 with legacy crypto library.
83
84config SPL_SHA256_LEGACY
85 bool "Enable SHA256 support in SPL with legacy crypto library"
86 depends on LEGACY_CRYPTO_BASIC && SPL_SHA256
87 help
88 This option enables support of hashing using SHA256 algorithm
89 with legacy crypto library.
90
91config SPL_SHA512_LEGACY
92 bool "Enable SHA512 support in SPL with legacy crypto library"
93 depends on LEGACY_CRYPTO_BASIC && SPL_SHA512
94 help
95 This option enables support of hashing using SHA512 algorithm
96 with legacy crypto library.
97
98config SPL_SHA384_LEGACY
99 bool "Enable SHA384 support in SPL with legacy crypto library"
100 depends on LEGACY_CRYPTO_BASIC && SPL_SHA384
101 select SPL_SHA512_LEGACY
102 help
103 This option enables support of hashing using SHA384 algorithm
104 with legacy crypto library.
105
106config SPL_MD5_LEGACY
107 bool "Enable MD5 support in SPL with legacy crypto library"
108 depends on LEGACY_CRYPTO_BASIC && SPL_MD5
109 help
110 This option enables support of hashing using MD5 algorithm
111 with legacy crypto library.
112
113endif # SPL
114
115endif # LEGACY_CRYPTO_BASIC
116
Raymond Mao87010c32024-10-03 14:50:15 -0700117config LEGACY_CRYPTO_CERT
118 bool "legacy certificate libraries"
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700119 select ASN1_DECODER_LEGACY if ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700120 select ASYMMETRIC_PUBLIC_KEY_LEGACY if \
121 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700122 select RSA_PUBLIC_KEY_PARSER_LEGACY if RSA_PUBLIC_KEY_PARSER
Raymond Mao7deec0f2024-10-03 14:50:30 -0700123 select X509_CERTIFICATE_PARSER_LEGACY if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700124 select PKCS7_MESSAGE_PARSER_LEGACY if PKCS7_MESSAGE_PARSER
Raymond Mao08f80c82024-10-03 14:50:35 -0700125 select MSCODE_PARSER_LEGACY if MSCODE_PARSER
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700126 select SPL_ASN1_DECODER_LEGACY if SPL_ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700127 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
128 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700129 select SPL_RSA_PUBLIC_KEY_PARSER_LEGACY if SPL_RSA_PUBLIC_KEY_PARSER
Raymond Mao87010c32024-10-03 14:50:15 -0700130 help
131 Enable legacy certificate libraries.
132
Raymond Mao702817b2024-10-03 14:50:28 -0700133if LEGACY_CRYPTO_CERT
134
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700135config ASN1_DECODER_LEGACY
136 bool "ASN1 decoder with legacy certificate library"
137 depends on LEGACY_CRYPTO_CERT && ASN1_DECODER
138 help
139 This option chooses legacy certificate library for ASN1 decoder.
140
Raymond Mao702817b2024-10-03 14:50:28 -0700141config ASYMMETRIC_PUBLIC_KEY_LEGACY
142 bool "Asymmetric public key crypto with legacy certificate library"
143 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
144 help
145 This option chooses legacy certificate library for asymmetric public
146 key crypto algorithm.
147
Raymond Mao42948e82024-10-03 14:50:36 -0700148config RSA_PUBLIC_KEY_PARSER_LEGACY
149 bool "RSA public key parser with legacy certificate library"
150 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
151 select ASN1_DECODER_LEGACY
152 help
153 This option chooses legacy certificate library for RSA public key
154 parser.
155
Raymond Mao7deec0f2024-10-03 14:50:30 -0700156config X509_CERTIFICATE_PARSER_LEGACY
157 bool "X.509 certificate parser with legacy certificate library"
158 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
159 select ASN1_DECODER_LEGACY
160 help
161 This option chooses legacy certificate library for X509 certificate
162 parser.
163
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700164config PKCS7_MESSAGE_PARSER_LEGACY
165 bool "PKCS#7 message parser with legacy certificate library"
166 depends on X509_CERTIFICATE_PARSER_LEGACY
167 select ASN1_DECODER_LEGACY
168 help
169 This option chooses legacy certificate library for PKCS7 message
170 parser.
171
Raymond Mao08f80c82024-10-03 14:50:35 -0700172config MSCODE_PARSER_LEGACY
173 bool "MS authenticode parser with legacy certificate library"
174 depends on LEGACY_CRYPTO_CERT && MSCODE_PARSER
175 select ASN1_DECODER_LEGACY
176 help
177 This option chooses legacy certificate library for MS authenticode
178 parser.
179
Raymond Mao702817b2024-10-03 14:50:28 -0700180if SPL
181
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700182config SPL_ASN1_DECODER_LEGACY
183 bool "ASN1 decoder with legacy certificate library in SPL"
184 depends on LEGACY_CRYPTO_CERT && SPL_ASN1_DECODER
185 help
186 This option chooses legacy certificate library for ASN1 decoder in
187 SPL.
188
Raymond Mao702817b2024-10-03 14:50:28 -0700189config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
190 bool "Asymmetric public key crypto with legacy certificate library in SPL"
191 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
192 help
193 This option chooses legacy certificate library for asymmetric public
194 key crypto algorithm in SPL.
195
Raymond Mao42948e82024-10-03 14:50:36 -0700196config SPL_RSA_PUBLIC_KEY_PARSER_LEGACY
197 bool "RSA public key parser with legacy certificate library in SPL"
198 depends on SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
199 select SPL_ASN1_DECODER_LEGACY
200 help
201 This option chooses legacy certificate library for RSA public key
202 parser in SPL.
203
Raymond Mao702817b2024-10-03 14:50:28 -0700204endif # SPL
205
206endif # LEGACY_CRYPTO_CERT
207
Raymond Mao87010c32024-10-03 14:50:15 -0700208endif # LEGACY_CRYPTO
209
210if MBEDTLS_LIB
211
212config MBEDTLS_LIB_CRYPTO_ALT
213 bool "MbedTLS crypto alternatives"
214 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
215 select LEGACY_CRYPTO_BASIC
216 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
217 help
218 Enable MbedTLS crypto alternatives.
219 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
220
221config MBEDTLS_LIB_CRYPTO
222 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700223 select MD5_MBEDTLS if MD5
224 select SHA1_MBEDTLS if SHA1
225 select SHA256_MBEDTLS if SHA256
226 select SHA512_MBEDTLS if SHA512
227 select SHA384_MBEDTLS if SHA384
228 select SPL_MD5_MBEDTLS if SPL_MD5
229 select SPL_SHA1_MBEDTLS if SPL_SHA1
230 select SPL_SHA256_MBEDTLS if SPL_SHA256
231 select SPL_SHA512_MBEDTLS if SPL_SHA512
232 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700233 help
234 Enable MbedTLS crypto libraries.
235 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
236
Raymond Maof51f3552024-10-03 14:50:19 -0700237if MBEDTLS_LIB_CRYPTO
238
239config SHA1_MBEDTLS
240 bool "Enable SHA1 support with MbedTLS crypto library"
241 depends on MBEDTLS_LIB_CRYPTO && SHA1
242 help
243 This option enables support of hashing using SHA1 algorithm
244 with MbedTLS crypto library.
245
246config SHA256_MBEDTLS
247 bool "Enable SHA256 support with MbedTLS crypto library"
248 depends on MBEDTLS_LIB_CRYPTO && SHA256
249 help
250 This option enables support of hashing using SHA256 algorithm
251 with MbedTLS crypto library.
252
Raymond Mao001b6132024-10-03 14:50:20 -0700253if SHA256_MBEDTLS
254
255config SHA256_SMALLER
256 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
257 depends on SHA256_MBEDTLS
258 default y if SHA256_MBEDTLS
259 help
260 This option enables support of hashing using SHA256 algorithm
261 smaller implementation with MbedTLS crypto library.
262
263endif
264
Raymond Maof51f3552024-10-03 14:50:19 -0700265config SHA512_MBEDTLS
266 bool "Enable SHA512 support with MbedTLS crypto library"
267 depends on MBEDTLS_LIB_CRYPTO && SHA512
268 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
269 help
270 This option enables support of hashing using SHA512 algorithm
271 with MbedTLS crypto library.
272
Raymond Mao001b6132024-10-03 14:50:20 -0700273if SHA512_MBEDTLS
274
275config SHA512_SMALLER
276 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
277 depends on SHA512_MBEDTLS
278 default y if SHA512_MBEDTLS
279 help
280 This option enables support of hashing using SHA512 algorithm
281 smaller implementation with MbedTLS crypto library.
282
283endif
284
Raymond Maof51f3552024-10-03 14:50:19 -0700285config SHA384_MBEDTLS
286 bool "Enable SHA384 support with MbedTLS crypto library"
287 depends on MBEDTLS_LIB_CRYPTO && SHA384
288 select SHA512_MBEDTLS
289 help
290 This option enables support of hashing using SHA384 algorithm
291 with MbedTLS crypto library.
292
293config MD5_MBEDTLS
294 bool "Enable MD5 support with MbedTLS crypto library"
295 depends on MBEDTLS_LIB_CRYPTO && MD5
296 help
297 This option enables support of hashing using MD5 algorithm
298 with MbedTLS crypto library.
299
Philippe Reynes1db678a2024-12-19 14:05:48 +0100300config HKDF_MBEDTLS
301 bool "Enable HKDF support with MbedTLS crypto library"
302 depends on MBEDTLS_LIB_CRYPTO
303 help
304 This option enables support of key derivation using HKDF algorithm
305 with MbedTLS crypto library.
306
Raymond Maof51f3552024-10-03 14:50:19 -0700307if SPL
308
309config SPL_SHA1_MBEDTLS
310 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
311 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
312 help
313 This option enables support of hashing using SHA1 algorithm
314 with MbedTLS crypto library.
315
316config SPL_SHA256_MBEDTLS
317 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
318 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
319 help
320 This option enables support of hashing using SHA256 algorithm
321 with MbedTLS crypto library.
322
323config SPL_SHA512_MBEDTLS
324 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
325 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
326 help
327 This option enables support of hashing using SHA512 algorithm
328 with MbedTLS crypto library.
329
330config SPL_SHA384_MBEDTLS
331 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
332 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
333 select SPL_SHA512
334 help
335 This option enables support of hashing using SHA384 algorithm
336 with MbedTLS crypto library.
337
338config SPL_MD5_MBEDTLS
339 bool "Enable MD5 support in SPL with MbedTLS crypto library"
340 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
341 help
342 This option enables support of hashing using MD5 algorithm
343 with MbedTLS crypto library.
344
Philippe Reynes1db678a2024-12-19 14:05:48 +0100345config SPL_HKDF_MBEDTLS
346 bool "Enable HKDF support in SPL with MbedTLS crypto library"
347 depends on MBEDTLS_LIB_CRYPTO
348 help
349 This option enables support of key derivation using HKDF algorithm
350 with MbedTLS crypto library.
351
Raymond Maof51f3552024-10-03 14:50:19 -0700352endif # SPL
353
354endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700355
356config MBEDTLS_LIB_X509
357 bool "MbedTLS certificate libraries"
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700358 select ASN1_DECODER_MBEDTLS if ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700359 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
360 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700361 select RSA_PUBLIC_KEY_PARSER_MBEDTLS if RSA_PUBLIC_KEY_PARSER
Raymond Mao7deec0f2024-10-03 14:50:30 -0700362 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700363 select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER
Raymond Maocd17ac22024-10-03 14:50:34 -0700364 select MSCODE_PARSER_MBEDTLS if MSCODE_PARSER
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700365 select SPL_ASN1_DECODER_MBEDTLS if SPL_ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700366 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
367 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700368 select SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS if SPL_RSA_PUBLIC_KEY_PARSER
Raymond Mao87010c32024-10-03 14:50:15 -0700369 help
370 Enable MbedTLS certificate libraries.
371
Raymond Mao702817b2024-10-03 14:50:28 -0700372if MBEDTLS_LIB_X509
373
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700374config ASN1_DECODER_MBEDTLS
375 bool "ASN1 decoder with MbedTLS certificate library"
376 depends on MBEDTLS_LIB_X509 && ASN1_DECODER
377 help
378 This option chooses MbedTLS certificate library for ASN1 decoder.
379
Raymond Mao702817b2024-10-03 14:50:28 -0700380config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
381 bool "Asymmetric public key crypto with MbedTLS certificate library"
382 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
383 help
384 This option chooses MbedTLS certificate library for asymmetric public
385 key crypto algorithm.
386
Raymond Mao42948e82024-10-03 14:50:36 -0700387config RSA_PUBLIC_KEY_PARSER_MBEDTLS
388 bool "RSA public key parser with MbedTLS certificate library"
389 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
390 select ASN1_DECODER_MBEDTLS
391 help
392 This option chooses MbedTLS certificate library for RSA public key
393 parser.
394
Raymond Mao7deec0f2024-10-03 14:50:30 -0700395config X509_CERTIFICATE_PARSER_MBEDTLS
396 bool "X.509 certificate parser with MbedTLS certificate library"
397 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
398 select ASN1_DECODER_MBEDTLS
399 help
400 This option chooses MbedTLS certificate library for X509 certificate
401 parser.
402
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700403config PKCS7_MESSAGE_PARSER_MBEDTLS
404 bool "PKCS#7 message parser with MbedTLS certificate library"
405 depends on X509_CERTIFICATE_PARSER_MBEDTLS
406 select ASN1_DECODER_MBEDTLS
407 help
408 This option chooses MbedTLS certificate library for PKCS7 message
409 parser.
410
Raymond Maocd17ac22024-10-03 14:50:34 -0700411config MSCODE_PARSER_MBEDTLS
412 bool "MS authenticode parser with MbedTLS certificate library"
413 depends on MBEDTLS_LIB_X509 && MSCODE_PARSER
414 select ASN1_DECODER_MBEDTLS
415 help
416 This option chooses MbedTLS certificate library for MS authenticode
417 parser.
418
Raymond Mao702817b2024-10-03 14:50:28 -0700419if SPL
420
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700421config SPL_ASN1_DECODER_MBEDTLS
422 bool "ASN1 decoder with MbedTLS certificate library in SPL"
423 depends on MBEDTLS_LIB_X509 && SPL_ASN1_DECODER
424 help
425 This option chooses MbedTLS certificate library for ASN1 decoder in
426 SPL.
427
Raymond Mao702817b2024-10-03 14:50:28 -0700428config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
429 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
430 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
431 help
432 This option chooses MbedTLS certificate library for asymmetric public
433 key crypto algorithm in SPL.
434
Raymond Mao42948e82024-10-03 14:50:36 -0700435config SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS
436 bool "RSA public key parser with MbedTLS certificate library in SPL"
437 depends on SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
438 select SPL_ASN1_DECODER_MBEDTLS
439 help
440 This option chooses MbedTLS certificate library for RSA public key
441 parser in SPL.
442
Raymond Mao702817b2024-10-03 14:50:28 -0700443endif # SPL
444
445endif # MBEDTLS_LIB_X509
446
Ilias Apalodimas9f75dc12024-11-10 10:28:37 +0200447config MBEDTLS_LIB_TLS
448 bool "MbedTLS TLS library"
449 depends on RSA_PUBLIC_KEY_PARSER_MBEDTLS
450 depends on X509_CERTIFICATE_PARSER_MBEDTLS
451 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
452 depends on ASN1_DECODER_MBEDTLS
453 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
454 depends on MBEDTLS_LIB_CRYPTO
455 help
456 Enable MbedTLS TLS library. Required for HTTPs support
457 in wget
458
Raymond Mao87010c32024-10-03 14:50:15 -0700459endif # MBEDTLS_LIB