blob: ab50ad4ebe9090f9d924e1ce905a796f9ecbe957 [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 Mao702817b2024-10-03 14:50:28 -0700119 select ASYMMETRIC_PUBLIC_KEY_LEGACY if \
120 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700121 select RSA_PUBLIC_KEY_PARSER_LEGACY if RSA_PUBLIC_KEY_PARSER
Raymond Mao7deec0f2024-10-03 14:50:30 -0700122 select X509_CERTIFICATE_PARSER_LEGACY if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700123 select PKCS7_MESSAGE_PARSER_LEGACY if PKCS7_MESSAGE_PARSER
Raymond Mao08f80c82024-10-03 14:50:35 -0700124 select MSCODE_PARSER_LEGACY if MSCODE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700125 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
126 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700127 select SPL_RSA_PUBLIC_KEY_PARSER_LEGACY if SPL_RSA_PUBLIC_KEY_PARSER
Raymond Mao87010c32024-10-03 14:50:15 -0700128 help
129 Enable legacy certificate libraries.
130
Raymond Mao702817b2024-10-03 14:50:28 -0700131if LEGACY_CRYPTO_CERT
132
133config ASYMMETRIC_PUBLIC_KEY_LEGACY
134 bool "Asymmetric public key crypto with legacy certificate library"
135 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
136 help
137 This option chooses legacy certificate library for asymmetric public
138 key crypto algorithm.
139
Raymond Mao42948e82024-10-03 14:50:36 -0700140config RSA_PUBLIC_KEY_PARSER_LEGACY
141 bool "RSA public key parser with legacy certificate library"
142 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
143 select ASN1_DECODER_LEGACY
144 help
145 This option chooses legacy certificate library for RSA public key
146 parser.
147
Raymond Mao7deec0f2024-10-03 14:50:30 -0700148config X509_CERTIFICATE_PARSER_LEGACY
149 bool "X.509 certificate 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 X509 certificate
154 parser.
155
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700156config PKCS7_MESSAGE_PARSER_LEGACY
157 bool "PKCS#7 message parser with legacy certificate library"
158 depends on X509_CERTIFICATE_PARSER_LEGACY
159 select ASN1_DECODER_LEGACY
160 help
161 This option chooses legacy certificate library for PKCS7 message
162 parser.
163
Raymond Mao08f80c82024-10-03 14:50:35 -0700164config MSCODE_PARSER_LEGACY
165 bool "MS authenticode parser with legacy certificate library"
166 depends on LEGACY_CRYPTO_CERT && MSCODE_PARSER
167 select ASN1_DECODER_LEGACY
168 help
169 This option chooses legacy certificate library for MS authenticode
170 parser.
171
Raymond Mao702817b2024-10-03 14:50:28 -0700172if SPL
173
174config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
175 bool "Asymmetric public key crypto with legacy certificate library in SPL"
176 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
177 help
178 This option chooses legacy certificate library for asymmetric public
179 key crypto algorithm in SPL.
180
Raymond Mao42948e82024-10-03 14:50:36 -0700181config SPL_RSA_PUBLIC_KEY_PARSER_LEGACY
182 bool "RSA public key parser with legacy certificate library in SPL"
183 depends on SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
184 select SPL_ASN1_DECODER_LEGACY
185 help
186 This option chooses legacy certificate library for RSA public key
187 parser in SPL.
188
Raymond Mao702817b2024-10-03 14:50:28 -0700189endif # SPL
190
191endif # LEGACY_CRYPTO_CERT
192
Raymond Mao87010c32024-10-03 14:50:15 -0700193endif # LEGACY_CRYPTO
194
195if MBEDTLS_LIB
196
197config MBEDTLS_LIB_CRYPTO_ALT
198 bool "MbedTLS crypto alternatives"
199 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
200 select LEGACY_CRYPTO_BASIC
201 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
202 help
203 Enable MbedTLS crypto alternatives.
204 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
205
206config MBEDTLS_LIB_CRYPTO
207 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700208 select MD5_MBEDTLS if MD5
209 select SHA1_MBEDTLS if SHA1
210 select SHA256_MBEDTLS if SHA256
211 select SHA512_MBEDTLS if SHA512
212 select SHA384_MBEDTLS if SHA384
213 select SPL_MD5_MBEDTLS if SPL_MD5
214 select SPL_SHA1_MBEDTLS if SPL_SHA1
215 select SPL_SHA256_MBEDTLS if SPL_SHA256
216 select SPL_SHA512_MBEDTLS if SPL_SHA512
217 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700218 help
219 Enable MbedTLS crypto libraries.
220 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
221
Raymond Maof51f3552024-10-03 14:50:19 -0700222if MBEDTLS_LIB_CRYPTO
223
224config SHA1_MBEDTLS
225 bool "Enable SHA1 support with MbedTLS crypto library"
226 depends on MBEDTLS_LIB_CRYPTO && SHA1
227 help
228 This option enables support of hashing using SHA1 algorithm
229 with MbedTLS crypto library.
230
231config SHA256_MBEDTLS
232 bool "Enable SHA256 support with MbedTLS crypto library"
233 depends on MBEDTLS_LIB_CRYPTO && SHA256
234 help
235 This option enables support of hashing using SHA256 algorithm
236 with MbedTLS crypto library.
237
Raymond Mao001b6132024-10-03 14:50:20 -0700238if SHA256_MBEDTLS
239
240config SHA256_SMALLER
241 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
242 depends on SHA256_MBEDTLS
243 default y if SHA256_MBEDTLS
244 help
245 This option enables support of hashing using SHA256 algorithm
246 smaller implementation with MbedTLS crypto library.
247
248endif
249
Raymond Maof51f3552024-10-03 14:50:19 -0700250config SHA512_MBEDTLS
251 bool "Enable SHA512 support with MbedTLS crypto library"
252 depends on MBEDTLS_LIB_CRYPTO && SHA512
253 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
254 help
255 This option enables support of hashing using SHA512 algorithm
256 with MbedTLS crypto library.
257
Raymond Mao001b6132024-10-03 14:50:20 -0700258if SHA512_MBEDTLS
259
260config SHA512_SMALLER
261 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
262 depends on SHA512_MBEDTLS
263 default y if SHA512_MBEDTLS
264 help
265 This option enables support of hashing using SHA512 algorithm
266 smaller implementation with MbedTLS crypto library.
267
268endif
269
Raymond Maof51f3552024-10-03 14:50:19 -0700270config SHA384_MBEDTLS
271 bool "Enable SHA384 support with MbedTLS crypto library"
272 depends on MBEDTLS_LIB_CRYPTO && SHA384
273 select SHA512_MBEDTLS
274 help
275 This option enables support of hashing using SHA384 algorithm
276 with MbedTLS crypto library.
277
278config MD5_MBEDTLS
279 bool "Enable MD5 support with MbedTLS crypto library"
280 depends on MBEDTLS_LIB_CRYPTO && MD5
281 help
282 This option enables support of hashing using MD5 algorithm
283 with MbedTLS crypto library.
284
285if SPL
286
287config SPL_SHA1_MBEDTLS
288 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
289 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
290 help
291 This option enables support of hashing using SHA1 algorithm
292 with MbedTLS crypto library.
293
294config SPL_SHA256_MBEDTLS
295 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
296 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
297 help
298 This option enables support of hashing using SHA256 algorithm
299 with MbedTLS crypto library.
300
301config SPL_SHA512_MBEDTLS
302 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
303 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
304 help
305 This option enables support of hashing using SHA512 algorithm
306 with MbedTLS crypto library.
307
308config SPL_SHA384_MBEDTLS
309 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
310 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
311 select SPL_SHA512
312 help
313 This option enables support of hashing using SHA384 algorithm
314 with MbedTLS crypto library.
315
316config SPL_MD5_MBEDTLS
317 bool "Enable MD5 support in SPL with MbedTLS crypto library"
318 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
319 help
320 This option enables support of hashing using MD5 algorithm
321 with MbedTLS crypto library.
322
323endif # SPL
324
325endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700326
327config MBEDTLS_LIB_X509
328 bool "MbedTLS certificate libraries"
Raymond Mao702817b2024-10-03 14:50:28 -0700329 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
330 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700331 select RSA_PUBLIC_KEY_PARSER_MBEDTLS if RSA_PUBLIC_KEY_PARSER
Raymond Mao7deec0f2024-10-03 14:50:30 -0700332 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700333 select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER
Raymond Maocd17ac22024-10-03 14:50:34 -0700334 select MSCODE_PARSER_MBEDTLS if MSCODE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700335 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
336 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao42948e82024-10-03 14:50:36 -0700337 select SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS if SPL_RSA_PUBLIC_KEY_PARSER
Raymond Mao87010c32024-10-03 14:50:15 -0700338 help
339 Enable MbedTLS certificate libraries.
340
Raymond Mao702817b2024-10-03 14:50:28 -0700341if MBEDTLS_LIB_X509
342
343config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
344 bool "Asymmetric public key crypto with MbedTLS certificate library"
345 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
346 help
347 This option chooses MbedTLS certificate library for asymmetric public
348 key crypto algorithm.
349
Raymond Mao42948e82024-10-03 14:50:36 -0700350config RSA_PUBLIC_KEY_PARSER_MBEDTLS
351 bool "RSA public key parser with MbedTLS certificate library"
352 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
353 select ASN1_DECODER_MBEDTLS
354 help
355 This option chooses MbedTLS certificate library for RSA public key
356 parser.
357
Raymond Mao7deec0f2024-10-03 14:50:30 -0700358config X509_CERTIFICATE_PARSER_MBEDTLS
359 bool "X.509 certificate parser with MbedTLS certificate library"
360 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
361 select ASN1_DECODER_MBEDTLS
362 help
363 This option chooses MbedTLS certificate library for X509 certificate
364 parser.
365
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700366config PKCS7_MESSAGE_PARSER_MBEDTLS
367 bool "PKCS#7 message parser with MbedTLS certificate library"
368 depends on X509_CERTIFICATE_PARSER_MBEDTLS
369 select ASN1_DECODER_MBEDTLS
370 help
371 This option chooses MbedTLS certificate library for PKCS7 message
372 parser.
373
Raymond Maocd17ac22024-10-03 14:50:34 -0700374config MSCODE_PARSER_MBEDTLS
375 bool "MS authenticode parser with MbedTLS certificate library"
376 depends on MBEDTLS_LIB_X509 && MSCODE_PARSER
377 select ASN1_DECODER_MBEDTLS
378 help
379 This option chooses MbedTLS certificate library for MS authenticode
380 parser.
381
Raymond Mao702817b2024-10-03 14:50:28 -0700382if SPL
383
384config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
385 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
386 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
387 help
388 This option chooses MbedTLS certificate library for asymmetric public
389 key crypto algorithm in SPL.
390
Raymond Mao42948e82024-10-03 14:50:36 -0700391config SPL_RSA_PUBLIC_KEY_PARSER_MBEDTLS
392 bool "RSA public key parser with MbedTLS certificate library in SPL"
393 depends on SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
394 select SPL_ASN1_DECODER_MBEDTLS
395 help
396 This option chooses MbedTLS certificate library for RSA public key
397 parser in SPL.
398
Raymond Mao702817b2024-10-03 14:50:28 -0700399endif # SPL
400
401endif # MBEDTLS_LIB_X509
402
Raymond Mao87010c32024-10-03 14:50:15 -0700403endif # MBEDTLS_LIB