blob: abdafd04e89069031557e6cb3a3ae15890446581 [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 Mao702817b2024-10-03 14:50:28 -0700122 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
123 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700124 help
125 Enable legacy certificate libraries.
126
Raymond Mao702817b2024-10-03 14:50:28 -0700127if LEGACY_CRYPTO_CERT
128
129config ASYMMETRIC_PUBLIC_KEY_LEGACY
130 bool "Asymmetric public key crypto with legacy certificate library"
131 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
132 help
133 This option chooses legacy certificate library for asymmetric public
134 key crypto algorithm.
135
Raymond Mao7deec0f2024-10-03 14:50:30 -0700136config X509_CERTIFICATE_PARSER_LEGACY
137 bool "X.509 certificate parser with legacy certificate library"
138 depends on ASYMMETRIC_PUBLIC_KEY_LEGACY
139 select ASN1_DECODER_LEGACY
140 help
141 This option chooses legacy certificate library for X509 certificate
142 parser.
143
Raymond Mao702817b2024-10-03 14:50:28 -0700144if SPL
145
146config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
147 bool "Asymmetric public key crypto with legacy certificate library in SPL"
148 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
149 help
150 This option chooses legacy certificate library for asymmetric public
151 key crypto algorithm in SPL.
152
153endif # SPL
154
155endif # LEGACY_CRYPTO_CERT
156
Raymond Mao87010c32024-10-03 14:50:15 -0700157endif # LEGACY_CRYPTO
158
159if MBEDTLS_LIB
160
161config MBEDTLS_LIB_CRYPTO_ALT
162 bool "MbedTLS crypto alternatives"
163 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
164 select LEGACY_CRYPTO_BASIC
165 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
166 help
167 Enable MbedTLS crypto alternatives.
168 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
169
170config MBEDTLS_LIB_CRYPTO
171 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700172 select MD5_MBEDTLS if MD5
173 select SHA1_MBEDTLS if SHA1
174 select SHA256_MBEDTLS if SHA256
175 select SHA512_MBEDTLS if SHA512
176 select SHA384_MBEDTLS if SHA384
177 select SPL_MD5_MBEDTLS if SPL_MD5
178 select SPL_SHA1_MBEDTLS if SPL_SHA1
179 select SPL_SHA256_MBEDTLS if SPL_SHA256
180 select SPL_SHA512_MBEDTLS if SPL_SHA512
181 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700182 help
183 Enable MbedTLS crypto libraries.
184 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
185
Raymond Maof51f3552024-10-03 14:50:19 -0700186if MBEDTLS_LIB_CRYPTO
187
188config SHA1_MBEDTLS
189 bool "Enable SHA1 support with MbedTLS crypto library"
190 depends on MBEDTLS_LIB_CRYPTO && SHA1
191 help
192 This option enables support of hashing using SHA1 algorithm
193 with MbedTLS crypto library.
194
195config SHA256_MBEDTLS
196 bool "Enable SHA256 support with MbedTLS crypto library"
197 depends on MBEDTLS_LIB_CRYPTO && SHA256
198 help
199 This option enables support of hashing using SHA256 algorithm
200 with MbedTLS crypto library.
201
Raymond Mao001b6132024-10-03 14:50:20 -0700202if SHA256_MBEDTLS
203
204config SHA256_SMALLER
205 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
206 depends on SHA256_MBEDTLS
207 default y if SHA256_MBEDTLS
208 help
209 This option enables support of hashing using SHA256 algorithm
210 smaller implementation with MbedTLS crypto library.
211
212endif
213
Raymond Maof51f3552024-10-03 14:50:19 -0700214config SHA512_MBEDTLS
215 bool "Enable SHA512 support with MbedTLS crypto library"
216 depends on MBEDTLS_LIB_CRYPTO && SHA512
217 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
218 help
219 This option enables support of hashing using SHA512 algorithm
220 with MbedTLS crypto library.
221
Raymond Mao001b6132024-10-03 14:50:20 -0700222if SHA512_MBEDTLS
223
224config SHA512_SMALLER
225 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
226 depends on SHA512_MBEDTLS
227 default y if SHA512_MBEDTLS
228 help
229 This option enables support of hashing using SHA512 algorithm
230 smaller implementation with MbedTLS crypto library.
231
232endif
233
Raymond Maof51f3552024-10-03 14:50:19 -0700234config SHA384_MBEDTLS
235 bool "Enable SHA384 support with MbedTLS crypto library"
236 depends on MBEDTLS_LIB_CRYPTO && SHA384
237 select SHA512_MBEDTLS
238 help
239 This option enables support of hashing using SHA384 algorithm
240 with MbedTLS crypto library.
241
242config MD5_MBEDTLS
243 bool "Enable MD5 support with MbedTLS crypto library"
244 depends on MBEDTLS_LIB_CRYPTO && MD5
245 help
246 This option enables support of hashing using MD5 algorithm
247 with MbedTLS crypto library.
248
249if SPL
250
251config SPL_SHA1_MBEDTLS
252 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
253 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
254 help
255 This option enables support of hashing using SHA1 algorithm
256 with MbedTLS crypto library.
257
258config SPL_SHA256_MBEDTLS
259 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
260 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
261 help
262 This option enables support of hashing using SHA256 algorithm
263 with MbedTLS crypto library.
264
265config SPL_SHA512_MBEDTLS
266 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
267 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
268 help
269 This option enables support of hashing using SHA512 algorithm
270 with MbedTLS crypto library.
271
272config SPL_SHA384_MBEDTLS
273 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
274 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
275 select SPL_SHA512
276 help
277 This option enables support of hashing using SHA384 algorithm
278 with MbedTLS crypto library.
279
280config SPL_MD5_MBEDTLS
281 bool "Enable MD5 support in SPL with MbedTLS crypto library"
282 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
283 help
284 This option enables support of hashing using MD5 algorithm
285 with MbedTLS crypto library.
286
287endif # SPL
288
289endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700290
291config MBEDTLS_LIB_X509
292 bool "MbedTLS certificate libraries"
Raymond Mao702817b2024-10-03 14:50:28 -0700293 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
294 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao7deec0f2024-10-03 14:50:30 -0700295 select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER
Raymond Mao702817b2024-10-03 14:50:28 -0700296 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
297 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700298 help
299 Enable MbedTLS certificate libraries.
300
Raymond Mao702817b2024-10-03 14:50:28 -0700301if MBEDTLS_LIB_X509
302
303config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
304 bool "Asymmetric public key crypto with MbedTLS certificate library"
305 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
306 help
307 This option chooses MbedTLS certificate library for asymmetric public
308 key crypto algorithm.
309
Raymond Mao7deec0f2024-10-03 14:50:30 -0700310config X509_CERTIFICATE_PARSER_MBEDTLS
311 bool "X.509 certificate parser with MbedTLS certificate library"
312 depends on ASYMMETRIC_PUBLIC_KEY_MBEDTLS
313 select ASN1_DECODER_MBEDTLS
314 help
315 This option chooses MbedTLS certificate library for X509 certificate
316 parser.
317
Raymond Mao702817b2024-10-03 14:50:28 -0700318if SPL
319
320config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
321 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
322 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
323 help
324 This option chooses MbedTLS certificate library for asymmetric public
325 key crypto algorithm in SPL.
326
327endif # SPL
328
329endif # MBEDTLS_LIB_X509
330
Raymond Mao87010c32024-10-03 14:50:15 -0700331endif # MBEDTLS_LIB