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 |
| 121 | select SPL_ASYMMETRIC_PUBLIC_KEY_LEGACY if \ |
| 122 | SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 123 | help |
| 124 | Enable legacy certificate libraries. |
| 125 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame^] | 126 | if LEGACY_CRYPTO_CERT |
| 127 | |
| 128 | config 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 | |
| 135 | if SPL |
| 136 | |
| 137 | config 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 | |
| 144 | endif # SPL |
| 145 | |
| 146 | endif # LEGACY_CRYPTO_CERT |
| 147 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 148 | endif # LEGACY_CRYPTO |
| 149 | |
| 150 | if MBEDTLS_LIB |
| 151 | |
| 152 | config 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 | |
| 161 | config MBEDTLS_LIB_CRYPTO |
| 162 | bool "MbedTLS crypto libraries" |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 163 | 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 Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 173 | help |
| 174 | Enable MbedTLS crypto libraries. |
| 175 | Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT. |
| 176 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 177 | if MBEDTLS_LIB_CRYPTO |
| 178 | |
| 179 | config 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 | |
| 186 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 193 | if SHA256_MBEDTLS |
| 194 | |
| 195 | config 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 | |
| 203 | endif |
| 204 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 205 | config 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 Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame] | 213 | if SHA512_MBEDTLS |
| 214 | |
| 215 | config 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 | |
| 223 | endif |
| 224 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 225 | config 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 | |
| 233 | config 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 | |
| 240 | if SPL |
| 241 | |
| 242 | config 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 | |
| 249 | config 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 | |
| 256 | config 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 | |
| 263 | config 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 | |
| 271 | config 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 | |
| 278 | endif # SPL |
| 279 | |
| 280 | endif # MBEDTLS_LIB_CRYPTO |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 281 | |
| 282 | config MBEDTLS_LIB_X509 |
| 283 | bool "MbedTLS certificate libraries" |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame^] | 284 | 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 Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 288 | help |
| 289 | Enable MbedTLS certificate libraries. |
| 290 | |
Raymond Mao | 702817b | 2024-10-03 14:50:28 -0700 | [diff] [blame^] | 291 | if MBEDTLS_LIB_X509 |
| 292 | |
| 293 | config 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 | |
| 300 | if SPL |
| 301 | |
| 302 | config 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 | |
| 309 | endif # SPL |
| 310 | |
| 311 | endif # MBEDTLS_LIB_X509 |
| 312 | |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 313 | endif # MBEDTLS_LIB |