blob: e81d14505ff7f372a92874fa668c8fc8e0ce4830 [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
121 select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \
122 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700123 help
124 Enable legacy certificate libraries.
125
Raymond Mao702817b2024-10-03 14:50:28 -0700126if LEGACY_CRYPTO_CERT
127
128config ASYMMETRIC_PUBLIC_KEY_LEGACY
129 bool "Asymmetric public key crypto with legacy certificate library"
130 depends on LEGACY_CRYPTO_CERT && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
131 help
132 This option chooses legacy certificate library for asymmetric public
133 key crypto algorithm.
134
135if SPL
136
137config SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY
138 bool "Asymmetric public key crypto with legacy certificate library in SPL"
139 depends on LEGACY_CRYPTO_CERT && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
140 help
141 This option chooses legacy certificate library for asymmetric public
142 key crypto algorithm in SPL.
143
144endif # SPL
145
146endif # LEGACY_CRYPTO_CERT
147
Raymond Mao87010c32024-10-03 14:50:15 -0700148endif # LEGACY_CRYPTO
149
150if MBEDTLS_LIB
151
152config MBEDTLS_LIB_CRYPTO_ALT
153 bool "MbedTLS crypto alternatives"
154 depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
155 select LEGACY_CRYPTO_BASIC
156 default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO
157 help
158 Enable MbedTLS crypto alternatives.
159 Mutually incompatible with MBEDTLS_LIB_CRYPTO.
160
161config MBEDTLS_LIB_CRYPTO
162 bool "MbedTLS crypto libraries"
Raymond Maof51f3552024-10-03 14:50:19 -0700163 select MD5_MBEDTLS if MD5
164 select SHA1_MBEDTLS if SHA1
165 select SHA256_MBEDTLS if SHA256
166 select SHA512_MBEDTLS if SHA512
167 select SHA384_MBEDTLS if SHA384
168 select SPL_MD5_MBEDTLS if SPL_MD5
169 select SPL_SHA1_MBEDTLS if SPL_SHA1
170 select SPL_SHA256_MBEDTLS if SPL_SHA256
171 select SPL_SHA512_MBEDTLS if SPL_SHA512
172 select SPL_SHA384_MBEDTLS if SPL_SHA384
Raymond Mao87010c32024-10-03 14:50:15 -0700173 help
174 Enable MbedTLS crypto libraries.
175 Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT.
176
Raymond Maof51f3552024-10-03 14:50:19 -0700177if MBEDTLS_LIB_CRYPTO
178
179config SHA1_MBEDTLS
180 bool "Enable SHA1 support with MbedTLS crypto library"
181 depends on MBEDTLS_LIB_CRYPTO && SHA1
182 help
183 This option enables support of hashing using SHA1 algorithm
184 with MbedTLS crypto library.
185
186config SHA256_MBEDTLS
187 bool "Enable SHA256 support with MbedTLS crypto library"
188 depends on MBEDTLS_LIB_CRYPTO && SHA256
189 help
190 This option enables support of hashing using SHA256 algorithm
191 with MbedTLS crypto library.
192
Raymond Mao001b6132024-10-03 14:50:20 -0700193if SHA256_MBEDTLS
194
195config SHA256_SMALLER
196 bool "Enable SHA256 smaller implementation with MbedTLS crypto library"
197 depends on SHA256_MBEDTLS
198 default y if SHA256_MBEDTLS
199 help
200 This option enables support of hashing using SHA256 algorithm
201 smaller implementation with MbedTLS crypto library.
202
203endif
204
Raymond Maof51f3552024-10-03 14:50:19 -0700205config SHA512_MBEDTLS
206 bool "Enable SHA512 support with MbedTLS crypto library"
207 depends on MBEDTLS_LIB_CRYPTO && SHA512
208 default y if TI_SECURE_DEVICE && FIT_SIGNATURE
209 help
210 This option enables support of hashing using SHA512 algorithm
211 with MbedTLS crypto library.
212
Raymond Mao001b6132024-10-03 14:50:20 -0700213if SHA512_MBEDTLS
214
215config SHA512_SMALLER
216 bool "Enable SHA512 smaller implementation with MbedTLS crypto library"
217 depends on SHA512_MBEDTLS
218 default y if SHA512_MBEDTLS
219 help
220 This option enables support of hashing using SHA512 algorithm
221 smaller implementation with MbedTLS crypto library.
222
223endif
224
Raymond Maof51f3552024-10-03 14:50:19 -0700225config SHA384_MBEDTLS
226 bool "Enable SHA384 support with MbedTLS crypto library"
227 depends on MBEDTLS_LIB_CRYPTO && SHA384
228 select SHA512_MBEDTLS
229 help
230 This option enables support of hashing using SHA384 algorithm
231 with MbedTLS crypto library.
232
233config MD5_MBEDTLS
234 bool "Enable MD5 support with MbedTLS crypto library"
235 depends on MBEDTLS_LIB_CRYPTO && MD5
236 help
237 This option enables support of hashing using MD5 algorithm
238 with MbedTLS crypto library.
239
240if SPL
241
242config SPL_SHA1_MBEDTLS
243 bool "Enable SHA1 support in SPL with MbedTLS crypto library"
244 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1
245 help
246 This option enables support of hashing using SHA1 algorithm
247 with MbedTLS crypto library.
248
249config SPL_SHA256_MBEDTLS
250 bool "Enable SHA256 support in SPL with MbedTLS crypto library"
251 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256
252 help
253 This option enables support of hashing using SHA256 algorithm
254 with MbedTLS crypto library.
255
256config SPL_SHA512_MBEDTLS
257 bool "Enable SHA512 support in SPL with MbedTLS crypto library"
258 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512
259 help
260 This option enables support of hashing using SHA512 algorithm
261 with MbedTLS crypto library.
262
263config SPL_SHA384_MBEDTLS
264 bool "Enable SHA384 support in SPL with MbedTLS crypto library"
265 depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384
266 select SPL_SHA512
267 help
268 This option enables support of hashing using SHA384 algorithm
269 with MbedTLS crypto library.
270
271config SPL_MD5_MBEDTLS
272 bool "Enable MD5 support in SPL with MbedTLS crypto library"
273 depends on MBEDTLS_LIB_CRYPTO && SPL_MD5
274 help
275 This option enables support of hashing using MD5 algorithm
276 with MbedTLS crypto library.
277
278endif # SPL
279
280endif # MBEDTLS_LIB_CRYPTO
Raymond Mao87010c32024-10-03 14:50:15 -0700281
282config MBEDTLS_LIB_X509
283 bool "MbedTLS certificate libraries"
Raymond Mao702817b2024-10-03 14:50:28 -0700284 select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
285 ASYMMETRIC_PUBLIC_KEY_SUBTYPE
286 select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \
287 SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
Raymond Mao87010c32024-10-03 14:50:15 -0700288 help
289 Enable MbedTLS certificate libraries.
290
Raymond Mao702817b2024-10-03 14:50:28 -0700291if MBEDTLS_LIB_X509
292
293config ASYMMETRIC_PUBLIC_KEY_MBEDTLS
294 bool "Asymmetric public key crypto with MbedTLS certificate library"
295 depends on MBEDTLS_LIB_X509 && ASYMMETRIC_PUBLIC_KEY_SUBTYPE
296 help
297 This option chooses MbedTLS certificate library for asymmetric public
298 key crypto algorithm.
299
300if SPL
301
302config SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS
303 bool "Asymmetric public key crypto with MbedTLS certificate library in SPL"
304 depends on MBEDTLS_LIB_X509 && SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
305 help
306 This option chooses MbedTLS certificate library for asymmetric public
307 key crypto algorithm in SPL.
308
309endif # SPL
310
311endif # MBEDTLS_LIB_X509
312
Raymond Mao87010c32024-10-03 14:50:15 -0700313endif # MBEDTLS_LIB