blob: 189bb3186b601e30680d1abf6c2185abcc99a022 [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 Mao702817b2024-10-03 14:50:28 -0700123 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
124 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700125 help
126 Enable legacy certificate libraries.
127
Raymond Mao702817b2024-10-03 14:50:28 -0700128if LEGACY_CRYPTO_CERT
129
130config ASYMMETRIC_PUBLIC_KEY_LEGACY
131 bool "Asymmetric public key crypto with legacy certificate library"
132 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
133 help
134 This option chooses legacy certificate library for asymmetric public
135 key crypto algorithm.
136
Raymond Mao7deec0f2024-10-03 14:50:30 -0700137config X509_CERTIFICATE_PARSER_LEGACY
138 bool "X.509 certificate parser with legacy certificate library"
139 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
140 select ASN1_DECODER_LEGACY
141 help
142 This option chooses legacy certificate library for X509 certificate
143 parser.
144
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700145config PKCS7_MESSAGE_PARSER_LEGACY
146 bool "PKCS#7 message parser with legacy certificate library"
147 depends on X509_CERTIFICATE_PARSER_LEGACY
148 select ASN1_DECODER_LEGACY
149 help
150 This option chooses legacy certificate library for PKCS7 message
151 parser.
152
Raymond Mao702817b2024-10-03 14:50:28 -0700153if SPL
154
155config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
156 bool "Asymmetric public key crypto with legacy certificate library in SPL"
157 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
158 help
159 This option chooses legacy certificate library for asymmetric public
160 key crypto algorithm in SPL.
161
162endif # SPL
163
164endif # LEGACY_CRYPTO_CERT
165
Raymond Mao87010c32024-10-03 14:50:15 -0700166endif # LEGACY_CRYPTO
167
168if MBEDTLS_LIB
169
170config MBEDTLS_LIB_CRYPTO_ALT
171 bool "MbedTLS crypto alternatives"
172 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
173 select LEGACY_CRYPTO_BASIC
174 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
175 help
176 Enable MbedTLS crypto alternatives.
177 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
178
179config MBEDTLS_LIB_CRYPTO
180 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700181 select MD5_MBEDTLS if MD5
182 select SHA1_MBEDTLS if SHA1
183 select SHA256_MBEDTLS if SHA256
184 select SHA512_MBEDTLS if SHA512
185 select SHA384_MBEDTLS if SHA384
186 select SPL_MD5_MBEDTLS if SPL_MD5
187 select SPL_SHA1_MBEDTLS if SPL_SHA1
188 select SPL_SHA256_MBEDTLS if SPL_SHA256
189 select SPL_SHA512_MBEDTLS if SPL_SHA512
190 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700191 help
192 Enable MbedTLS crypto libraries.
193 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
194
Raymond Maof51f3552024-10-03 14:50:19 -0700195if MBEDTLS_LIB_CRYPTO
196
197config SHA1_MBEDTLS
198 bool "Enable SHA1 support with MbedTLS crypto library"
199 depends on MBEDTLS_LIB_CRYPTO && SHA1
200 help
201 This option enables support of hashing using SHA1 algorithm
202 with MbedTLS crypto library.
203
204config SHA256_MBEDTLS
205 bool "Enable SHA256 support with MbedTLS crypto library"
206 depends on MBEDTLS_LIB_CRYPTO && SHA256
207 help
208 This option enables support of hashing using SHA256 algorithm
209 with MbedTLS crypto library.
210
Raymond Mao001b6132024-10-03 14:50:20 -0700211if SHA256_MBEDTLS
212
213config SHA256_SMALLER
214 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
215 depends on SHA256_MBEDTLS
216 default y if SHA256_MBEDTLS
217 help
218 This option enables support of hashing using SHA256 algorithm
219 smaller implementation with MbedTLS crypto library.
220
221endif
222
Raymond Maof51f3552024-10-03 14:50:19 -0700223config SHA512_MBEDTLS
224 bool "Enable SHA512 support with MbedTLS crypto library"
225 depends on MBEDTLS_LIB_CRYPTO && SHA512
226 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
227 help
228 This option enables support of hashing using SHA512 algorithm
229 with MbedTLS crypto library.
230
Raymond Mao001b6132024-10-03 14:50:20 -0700231if SHA512_MBEDTLS
232
233config SHA512_SMALLER
234 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
235 depends on SHA512_MBEDTLS
236 default y if SHA512_MBEDTLS
237 help
238 This option enables support of hashing using SHA512 algorithm
239 smaller implementation with MbedTLS crypto library.
240
241endif
242
Raymond Maof51f3552024-10-03 14:50:19 -0700243config SHA384_MBEDTLS
244 bool "Enable SHA384 support with MbedTLS crypto library"
245 depends on MBEDTLS_LIB_CRYPTO && SHA384
246 select SHA512_MBEDTLS
247 help
248 This option enables support of hashing using SHA384 algorithm
249 with MbedTLS crypto library.
250
251config MD5_MBEDTLS
252 bool "Enable MD5 support with MbedTLS crypto library"
253 depends on MBEDTLS_LIB_CRYPTO && MD5
254 help
255 This option enables support of hashing using MD5 algorithm
256 with MbedTLS crypto library.
257
258if SPL
259
260config SPL_SHA1_MBEDTLS
261 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
262 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
263 help
264 This option enables support of hashing using SHA1 algorithm
265 with MbedTLS crypto library.
266
267config SPL_SHA256_MBEDTLS
268 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
269 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
270 help
271 This option enables support of hashing using SHA256 algorithm
272 with MbedTLS crypto library.
273
274config SPL_SHA512_MBEDTLS
275 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
276 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
277 help
278 This option enables support of hashing using SHA512 algorithm
279 with MbedTLS crypto library.
280
281config SPL_SHA384_MBEDTLS
282 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
283 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
284 select SPL_SHA512
285 help
286 This option enables support of hashing using SHA384 algorithm
287 with MbedTLS crypto library.
288
289config SPL_MD5_MBEDTLS
290 bool "Enable MD5 support in SPL with MbedTLS crypto library"
291 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
292 help
293 This option enables support of hashing using MD5 algorithm
294 with MbedTLS crypto library.
295
296endif # SPL
297
298endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700299
300config MBEDTLS_LIB_X509
301 bool "MbedTLS certificate libraries"
Raymond Mao702817b2024-10-03 14:50:28 -0700302 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
303 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao7deec0f2024-10-03 14:50:30 -0700304 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700305 select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700306 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
307 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700308 help
309 Enable MbedTLS certificate libraries.
310
Raymond Mao702817b2024-10-03 14:50:28 -0700311if MBEDTLS_LIB_X509
312
313config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
314 bool "Asymmetric public key crypto with MbedTLS certificate library"
315 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
316 help
317 This option chooses MbedTLS certificate library for asymmetric public
318 key crypto algorithm.
319
Raymond Mao7deec0f2024-10-03 14:50:30 -0700320config X509_CERTIFICATE_PARSER_MBEDTLS
321 bool "X.509 certificate parser with MbedTLS certificate library"
322 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
323 select ASN1_DECODER_MBEDTLS
324 help
325 This option chooses MbedTLS certificate library for X509 certificate
326 parser.
327
Raymond Mao7b3dfd02024-10-03 14:50:32 -0700328config PKCS7_MESSAGE_PARSER_MBEDTLS
329 bool "PKCS#7 message parser with MbedTLS certificate library"
330 depends on X509_CERTIFICATE_PARSER_MBEDTLS
331 select ASN1_DECODER_MBEDTLS
332 help
333 This option chooses MbedTLS certificate library for PKCS7 message
334 parser.
335
Raymond Mao702817b2024-10-03 14:50:28 -0700336if SPL
337
338config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
339 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
340 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
341 help
342 This option chooses MbedTLS certificate library for asymmetric public
343 key crypto algorithm in SPL.
344
345endif # SPL
346
347endif # MBEDTLS_LIB_X509
348
Raymond Mao87010c32024-10-03 14:50:15 -0700349endif # MBEDTLS_LIB