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 | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 122 | select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \ |
| 123 | SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 124 | help |
| 125 | Enable legacy certificate libraries. |
| 126 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 127 | if LEGACY_CRYPTO_CERT |
| 128 | |
| 129 | config 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 Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame^] | 136 | config 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 Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 144 | if SPL |
| 145 | |
| 146 | config 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 | |
| 153 | endif # SPL |
| 154 | |
| 155 | endif # LEGACY_CRYPTO_CERT |
| 156 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 157 | endif # LEGACY_CRYPTO |
| 158 | |
| 159 | if MBEDTLS_LIB |
| 160 | |
| 161 | config 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 | |
| 170 | config MBEDTLS_LIB_CRYPTO |
| 171 | bool "MbedTLS crypto libraries" |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 172 | 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 Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 182 | help |
| 183 | Enable MbedTLS crypto libraries. |
| 184 | Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT. |
| 185 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 186 | if MBEDTLS_LIB_CRYPTO |
| 187 | |
| 188 | config 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 | |
| 195 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 202 | if SHA256_MBEDTLS |
| 203 | |
| 204 | config 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 | |
| 212 | endif |
| 213 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 214 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 222 | if SHA512_MBEDTLS |
| 223 | |
| 224 | config 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 | |
| 232 | endif |
| 233 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 234 | config 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 | |
| 242 | config 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 | |
| 249 | if SPL |
| 250 | |
| 251 | config 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 | |
| 258 | config 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 | |
| 265 | config 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 | |
| 272 | config 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 | |
| 280 | config 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 | |
| 287 | endif # SPL |
| 288 | |
| 289 | endif # MBEDTLS_LIB_CRYPTO |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 290 | |
| 291 | config MBEDTLS_LIB_X509 |
| 292 | bool "MbedTLS certificate libraries" |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 293 | select ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \ |
| 294 | ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame^] | 295 | select X509_CERTIFICATE_PARSER_MBEDTLS if X509_CERTIFICATE_PARSER |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 296 | select SPL_ASYMMETRIC_PUBLIC_KEY_MBEDTLS if \ |
| 297 | SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 298 | help |
| 299 | Enable MbedTLS certificate libraries. |
| 300 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 301 | if MBEDTLS_LIB_X509 |
| 302 | |
| 303 | config 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 Mao | 7deec0f | 2024-10-03 14:50:30 -0700 | [diff] [blame^] | 310 | config 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 Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame] | 318 | if SPL |
| 319 | |
| 320 | config 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 | |
| 327 | endif # SPL |
| 328 | |
| 329 | endif # MBEDTLS_LIB_X509 |
| 330 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 331 | endif # MBEDTLS_LIB |