Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 1 | choice |
| 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 | |
| 9 | config LEGACY_CRYPTO |
| 10 | bool "legacy crypto libraries" |
| 11 | select LEGACY_CRYPTO_BASIC |
| 12 | select LEGACY_CRYPTO_CERT |
| 13 | |
| 14 | config MBEDTLS_LIB |
| 15 | bool "MbedTLS libraries" |
| 16 | select MBEDTLS_LIB_X509 |
| 17 | endchoice |
| 18 | |
| 19 | if LEGACY_CRYPTO || MBEDTLS_LIB_CRYPTO_ALT |
| 20 | |
| 21 | config LEGACY_CRYPTO_BASIC |
| 22 | bool "legacy basic crypto libraries" |
Raymond Mao | a571b98 | 2024-10-03 14:50:16 -0700 | [diff] [blame] | 23 | 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 Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 33 | help |
| 34 | Enable legacy basic crypto libraries. |
| 35 | |
Raymond Mao | a571b98 | 2024-10-03 14:50:16 -0700 | [diff] [blame] | 36 | if LEGACY_CRYPTO_BASIC |
| 37 | |
| 38 | config 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 | |
| 45 | config 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 | |
| 52 | config 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 | |
| 60 | config 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 | |
| 68 | config 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 | |
| 75 | if SPL |
| 76 | |
| 77 | config 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 | |
| 84 | config 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 | |
| 91 | config 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 | |
| 98 | config 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 | |
| 106 | config 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 | |
| 113 | endif # SPL |
| 114 | |
| 115 | endif # LEGACY_CRYPTO_BASIC |
| 116 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 117 | config LEGACY_CRYPTO_CERT |
| 118 | bool "legacy certificate libraries" |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 119 | select ASYMMETRIC_PUBLIC_KEY_LEGACY if \ |
| 120 | ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame] | 121 | select X509_CERTIFICATE_PARSER_LEGACY if X509_CERTIFICATE_PARSER |
Raymond Mao | 7b3dfd0 | 2024-10-03 14:50:32 -0700 | [diff] [blame] | 122 | select PKCS7_MESSAGE_PARSER_LEGACY if PKCS7_MESSAGE_PARSER |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 123 | select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \ |
| 124 | SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 125 | help |
| 126 | Enable legacy certificate libraries. |
| 127 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 128 | if LEGACY_CRYPTO_CERT |
| 129 | |
| 130 | config 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 Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame] | 137 | config 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 Mao | 7b3dfd0 | 2024-10-03 14:50:32 -0700 | [diff] [blame] | 145 | config 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 Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 153 | if SPL |
| 154 | |
| 155 | config 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 | |
| 162 | endif # SPL |
| 163 | |
| 164 | endif # LEGACY_CRYPTO_CERT |
| 165 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 166 | endif # LEGACY_CRYPTO |
| 167 | |
| 168 | if MBEDTLS_LIB |
| 169 | |
| 170 | config 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 | |
| 179 | config MBEDTLS_LIB_CRYPTO |
| 180 | bool "MbedTLS crypto libraries" |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 181 | 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 Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 191 | help |
| 192 | Enable MbedTLS crypto libraries. |
| 193 | Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT. |
| 194 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 195 | if MBEDTLS_LIB_CRYPTO |
| 196 | |
| 197 | config 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 | |
| 204 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 211 | if SHA256_MBEDTLS |
| 212 | |
| 213 | config 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 | |
| 221 | endif |
| 222 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 223 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 231 | if SHA512_MBEDTLS |
| 232 | |
| 233 | config 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 | |
| 241 | endif |
| 242 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 243 | config 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 | |
| 251 | config 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 | |
| 258 | if SPL |
| 259 | |
| 260 | config 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 | |
| 267 | config 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 | |
| 274 | config 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 | |
| 281 | config 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 | |
| 289 | config 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 | |
| 296 | endif # SPL |
| 297 | |
| 298 | endif # MBEDTLS_LIB_CRYPTO |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 299 | |
| 300 | config MBEDTLS_LIB_X509 |
| 301 | bool "MbedTLS certificate libraries" |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 302 | select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \ |
| 303 | ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame] | 304 | select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER |
Raymond Mao | 7b3dfd0 | 2024-10-03 14:50:32 -0700 | [diff] [blame] | 305 | select PKCS7_MESSAGE_PARSER_MBEDTLS if PKCS7_MESSAGE_PARSER |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 306 | select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \ |
| 307 | SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 308 | help |
| 309 | Enable MbedTLS certificate libraries. |
| 310 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 311 | if MBEDTLS_LIB_X509 |
| 312 | |
| 313 | config 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 Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame] | 320 | config 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 Mao | 7b3dfd0 | 2024-10-03 14:50:32 -0700 | [diff] [blame] | 328 | config 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 Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 336 | if SPL |
| 337 | |
| 338 | config 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 | |
| 345 | endif # SPL |
| 346 | |
| 347 | endif # MBEDTLS_LIB_X509 |
| 348 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 349 | endif # MBEDTLS_LIB |