blob: d71adc3648ad87d45daa101624a3bce6c71c3267 [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
300if SPL
301
302config SPL_SHA1_MBEDTLS
303 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
304 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
305 help
306 This option enables support of hashing using SHA1 algorithm
307 with MbedTLS crypto library.
308
309config SPL_SHA256_MBEDTLS
310 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
311 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
312 help
313 This option enables support of hashing using SHA256 algorithm
314 with MbedTLS crypto library.
315
316config SPL_SHA512_MBEDTLS
317 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
318 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
319 help
320 This option enables support of hashing using SHA512 algorithm
321 with MbedTLS crypto library.
322
323config SPL_SHA384_MBEDTLS
324 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
325 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
326 select SPL_SHA512
327 help
328 This option enables support of hashing using SHA384 algorithm
329 with MbedTLS crypto library.
330
331config SPL_MD5_MBEDTLS
332 bool "Enable MD5 support in SPL with MbedTLS crypto library"
333 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
334 help
335 This option enables support of hashing using MD5 algorithm
336 with MbedTLS crypto library.
337
338endif # SPL
339
340endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700341
342config MBEDTLS_LIB_X509
343 bool "MbedTLS certificate libraries"
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700344 select ASN1_DECODER_MBEDTLS if ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700345 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
346 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700347 select RSA_PUBLIC_KEY_PARSER_MBEDTLS if RSA_PUBLIC_KEY_PARSER
Raymond Mao7deec0f2024-10-03 14:50:30 -0700348 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700349 select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER
Raymond Maocd17ac22024-10-03 14:50:34 -0700350 select MSCODE_PARSER_MBEDTLS if MSCODE_PARSER
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700351 select SPL_ASN1_DECODER_MBEDTLS if SPL_ASN1_DECODER
Raymond Mao702817b2024-10-03 14:50:28 -0700352 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
353 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700354 select SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS if SPL_RSA_PUBLIC_KEY_PARSER
Raymond Mao87010c32024-10-03 14:50:15 -0700355 help
356 Enable MbedTLS certificate libraries.
357
Raymond Mao702817b2024-10-03 14:50:28 -0700358if MBEDTLS_LIB_X509
359
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700360config ASN1_DECODER_MBEDTLS
361 bool "ASN1 decoder with MbedTLS certificate library"
362 depends on MBEDTLS_LIB_X509 && ASN1_DECODER
363 help
364 This option chooses MbedTLS certificate library for ASN1 decoder.
365
Raymond Mao702817b2024-10-03 14:50:28 -0700366config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
367 bool "Asymmetric public key crypto with MbedTLS certificate library"
368 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
369 help
370 This option chooses MbedTLS certificate library for asymmetric public
371 key crypto algorithm.
372
Raymond Mao42948e82024-10-03 14:50:36 -0700373config RSA_PUBLIC_KEY_PARSER_MBEDTLS
374 bool "RSA public key parser with MbedTLS certificate library"
375 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
376 select ASN1_DECODER_MBEDTLS
377 help
378 This option chooses MbedTLS certificate library for RSA public key
379 parser.
380
Raymond Mao7deec0f2024-10-03 14:50:30 -0700381config X509_CERTIFICATE_PARSER_MBEDTLS
382 bool "X.509 certificate parser with MbedTLS certificate library"
383 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
384 select ASN1_DECODER_MBEDTLS
385 help
386 This option chooses MbedTLS certificate library for X509 certificate
387 parser.
388
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700389config PKCS7_MESSAGE_PARSER_MBEDTLS
390 bool "PKCS#7 message parser with MbedTLS certificate library"
391 depends on X509_CERTIFICATE_PARSER_MBEDTLS
392 select ASN1_DECODER_MBEDTLS
393 help
394 This option chooses MbedTLS certificate library for PKCS7 message
395 parser.
396
Raymond Maocd17ac22024-10-03 14:50:34 -0700397config MSCODE_PARSER_MBEDTLS
398 bool "MS authenticode parser with MbedTLS certificate library"
399 depends on MBEDTLS_LIB_X509 && MSCODE_PARSER
400 select ASN1_DECODER_MBEDTLS
401 help
402 This option chooses MbedTLS certificate library for MS authenticode
403 parser.
404
Raymond Mao702817b2024-10-03 14:50:28 -0700405if SPL
406
Raymond Mao2faa4bd2024-10-03 14:50:38 -0700407config SPL_ASN1_DECODER_MBEDTLS
408 bool "ASN1 decoder with MbedTLS certificate library in SPL"
409 depends on MBEDTLS_LIB_X509 && SPL_ASN1_DECODER
410 help
411 This option chooses MbedTLS certificate library for ASN1 decoder in
412 SPL.
413
Raymond Mao702817b2024-10-03 14:50:28 -0700414config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
415 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
416 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
417 help
418 This option chooses MbedTLS certificate library for asymmetric public
419 key crypto algorithm in SPL.
420
Raymond Mao42948e82024-10-03 14:50:36 -0700421config SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS
422 bool "RSA public key parser with MbedTLS certificate library in SPL"
423 depends on SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
424 select SPL_ASN1_DECODER_MBEDTLS
425 help
426 This option chooses MbedTLS certificate library for RSA public key
427 parser in SPL.
428
Raymond Mao702817b2024-10-03 14:50:28 -0700429endif # SPL
430
431endif # MBEDTLS_LIB_X509
432
Raymond Mao87010c32024-10-03 14:50:15 -0700433endif # MBEDTLS_LIB