blob: efeaed503851d30c6002e1ceb8cf660f48dd1fff [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 Mao7deec0f2024-10-03 14:50:30 -0700121 select X509_CERTIFICATE_PARSER_LEGACY if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700122 select PKCS7_MESSAGE_PARSER_LEGACY if PKCS7_MESSAGE_PARSER
Raymond Mao08f80c82024-10-03 14:50:35 -0700123 select MSCODE_PARSER_LEGACY if MSCODE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700124 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
125 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700126 help
127 Enable legacy certificate libraries.
128
Raymond Mao702817b2024-10-03 14:50:28 -0700129if LEGACY_CRYPTO_CERT
130
131config ASYMMETRIC_PUBLIC_KEY_LEGACY
132 bool "Asymmetric public key crypto with legacy certificate library"
133 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
134 help
135 This option chooses legacy certificate library for asymmetric public
136 key crypto algorithm.
137
Raymond Mao7deec0f2024-10-03 14:50:30 -0700138config X509_CERTIFICATE_PARSER_LEGACY
139 bool "X.509 certificate parser with legacy certificate library"
140 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
141 select ASN1_DECODER_LEGACY
142 help
143 This option chooses legacy certificate library for X509 certificate
144 parser.
145
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700146config PKCS7_MESSAGE_PARSER_LEGACY
147 bool "PKCS#7 message parser with legacy certificate library"
148 depends on X509_CERTIFICATE_PARSER_LEGACY
149 select ASN1_DECODER_LEGACY
150 help
151 This option chooses legacy certificate library for PKCS7 message
152 parser.
153
Raymond Mao08f80c82024-10-03 14:50:35 -0700154config MSCODE_PARSER_LEGACY
155 bool "MS authenticode parser with legacy certificate library"
156 depends on LEGACY_CRYPTO_CERT && MSCODE_PARSER
157 select ASN1_DECODER_LEGACY
158 help
159 This option chooses legacy certificate library for MS authenticode
160 parser.
161
Raymond Mao702817b2024-10-03 14:50:28 -0700162if SPL
163
164config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
165 bool "Asymmetric public key crypto with legacy certificate library in SPL"
166 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
167 help
168 This option chooses legacy certificate library for asymmetric public
169 key crypto algorithm in SPL.
170
171endif # SPL
172
173endif # LEGACY_CRYPTO_CERT
174
Raymond Mao87010c32024-10-03 14:50:15 -0700175endif # LEGACY_CRYPTO
176
177if MBEDTLS_LIB
178
179config MBEDTLS_LIB_CRYPTO_ALT
180 bool "MbedTLS crypto alternatives"
181 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
182 select LEGACY_CRYPTO_BASIC
183 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
184 help
185 Enable MbedTLS crypto alternatives.
186 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
187
188config MBEDTLS_LIB_CRYPTO
189 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700190 select MD5_MBEDTLS if MD5
191 select SHA1_MBEDTLS if SHA1
192 select SHA256_MBEDTLS if SHA256
193 select SHA512_MBEDTLS if SHA512
194 select SHA384_MBEDTLS if SHA384
195 select SPL_MD5_MBEDTLS if SPL_MD5
196 select SPL_SHA1_MBEDTLS if SPL_SHA1
197 select SPL_SHA256_MBEDTLS if SPL_SHA256
198 select SPL_SHA512_MBEDTLS if SPL_SHA512
199 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700200 help
201 Enable MbedTLS crypto libraries.
202 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
203
Raymond Maof51f3552024-10-03 14:50:19 -0700204if MBEDTLS_LIB_CRYPTO
205
206config SHA1_MBEDTLS
207 bool "Enable SHA1 support with MbedTLS crypto library"
208 depends on MBEDTLS_LIB_CRYPTO && SHA1
209 help
210 This option enables support of hashing using SHA1 algorithm
211 with MbedTLS crypto library.
212
213config SHA256_MBEDTLS
214 bool "Enable SHA256 support with MbedTLS crypto library"
215 depends on MBEDTLS_LIB_CRYPTO && SHA256
216 help
217 This option enables support of hashing using SHA256 algorithm
218 with MbedTLS crypto library.
219
Raymond Mao001b6132024-10-03 14:50:20 -0700220if SHA256_MBEDTLS
221
222config SHA256_SMALLER
223 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
224 depends on SHA256_MBEDTLS
225 default y if SHA256_MBEDTLS
226 help
227 This option enables support of hashing using SHA256 algorithm
228 smaller implementation with MbedTLS crypto library.
229
230endif
231
Raymond Maof51f3552024-10-03 14:50:19 -0700232config SHA512_MBEDTLS
233 bool "Enable SHA512 support with MbedTLS crypto library"
234 depends on MBEDTLS_LIB_CRYPTO && SHA512
235 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
236 help
237 This option enables support of hashing using SHA512 algorithm
238 with MbedTLS crypto library.
239
Raymond Mao001b6132024-10-03 14:50:20 -0700240if SHA512_MBEDTLS
241
242config SHA512_SMALLER
243 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
244 depends on SHA512_MBEDTLS
245 default y if SHA512_MBEDTLS
246 help
247 This option enables support of hashing using SHA512 algorithm
248 smaller implementation with MbedTLS crypto library.
249
250endif
251
Raymond Maof51f3552024-10-03 14:50:19 -0700252config SHA384_MBEDTLS
253 bool "Enable SHA384 support with MbedTLS crypto library"
254 depends on MBEDTLS_LIB_CRYPTO && SHA384
255 select SHA512_MBEDTLS
256 help
257 This option enables support of hashing using SHA384 algorithm
258 with MbedTLS crypto library.
259
260config MD5_MBEDTLS
261 bool "Enable MD5 support with MbedTLS crypto library"
262 depends on MBEDTLS_LIB_CRYPTO && MD5
263 help
264 This option enables support of hashing using MD5 algorithm
265 with MbedTLS crypto library.
266
267if SPL
268
269config SPL_SHA1_MBEDTLS
270 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
271 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
272 help
273 This option enables support of hashing using SHA1 algorithm
274 with MbedTLS crypto library.
275
276config SPL_SHA256_MBEDTLS
277 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
278 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
279 help
280 This option enables support of hashing using SHA256 algorithm
281 with MbedTLS crypto library.
282
283config SPL_SHA512_MBEDTLS
284 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
285 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
286 help
287 This option enables support of hashing using SHA512 algorithm
288 with MbedTLS crypto library.
289
290config SPL_SHA384_MBEDTLS
291 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
292 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
293 select SPL_SHA512
294 help
295 This option enables support of hashing using SHA384 algorithm
296 with MbedTLS crypto library.
297
298config SPL_MD5_MBEDTLS
299 bool "Enable MD5 support in SPL with MbedTLS crypto library"
300 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
301 help
302 This option enables support of hashing using MD5 algorithm
303 with MbedTLS crypto library.
304
305endif # SPL
306
307endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700308
309config MBEDTLS_LIB_X509
310 bool "MbedTLS certificate libraries"
Raymond Mao702817b2024-10-03 14:50:28 -0700311 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
312 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao7deec0f2024-10-03 14:50:30 -0700313 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700314 select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER
Raymond Maocd17ac22024-10-03 14:50:34 -0700315 select MSCODE_PARSER_MBEDTLS if MSCODE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700316 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
317 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700318 help
319 Enable MbedTLS certificate libraries.
320
Raymond Mao702817b2024-10-03 14:50:28 -0700321if MBEDTLS_LIB_X509
322
323config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
324 bool "Asymmetric public key crypto with MbedTLS certificate library"
325 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
326 help
327 This option chooses MbedTLS certificate library for asymmetric public
328 key crypto algorithm.
329
Raymond Mao7deec0f2024-10-03 14:50:30 -0700330config X509_CERTIFICATE_PARSER_MBEDTLS
331 bool "X.509 certificate parser with MbedTLS certificate library"
332 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
333 select ASN1_DECODER_MBEDTLS
334 help
335 This option chooses MbedTLS certificate library for X509 certificate
336 parser.
337
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700338config PKCS7_MESSAGE_PARSER_MBEDTLS
339 bool "PKCS#7 message parser with MbedTLS certificate library"
340 depends on X509_CERTIFICATE_PARSER_MBEDTLS
341 select ASN1_DECODER_MBEDTLS
342 help
343 This option chooses MbedTLS certificate library for PKCS7 message
344 parser.
345
Raymond Maocd17ac22024-10-03 14:50:34 -0700346config MSCODE_PARSER_MBEDTLS
347 bool "MS authenticode parser with MbedTLS certificate library"
348 depends on MBEDTLS_LIB_X509 && MSCODE_PARSER
349 select ASN1_DECODER_MBEDTLS
350 help
351 This option chooses MbedTLS certificate library for MS authenticode
352 parser.
353
Raymond Mao702817b2024-10-03 14:50:28 -0700354if SPL
355
356config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
357 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
358 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
359 help
360 This option chooses MbedTLS certificate library for asymmetric public
361 key crypto algorithm in SPL.
362
363endif # SPL
364
365endif # MBEDTLS_LIB_X509
366
Raymond Mao87010c32024-10-03 14:50:15 -0700367endif # MBEDTLS_LIB