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" |
| 119 | help |
| 120 | Enable legacy certificate libraries. |
| 121 | |
| 122 | endif # LEGACY_CRYPTO |
| 123 | |
| 124 | if MBEDTLS_LIB |
| 125 | |
| 126 | config MBEDTLS_LIB_CRYPTO_ALT |
| 127 | bool "MbedTLS crypto alternatives" |
| 128 | depends on MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO |
| 129 | select LEGACY_CRYPTO_BASIC |
| 130 | default y if MBEDTLS_LIB && !MBEDTLS_LIB_CRYPTO |
| 131 | help |
| 132 | Enable MbedTLS crypto alternatives. |
| 133 | Mutually incompatible with MBEDTLS_LIB_CRYPTO. |
| 134 | |
| 135 | config MBEDTLS_LIB_CRYPTO |
| 136 | bool "MbedTLS crypto libraries" |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 137 | select MD5_MBEDTLS if MD5 |
| 138 | select SHA1_MBEDTLS if SHA1 |
| 139 | select SHA256_MBEDTLS if SHA256 |
| 140 | select SHA512_MBEDTLS if SHA512 |
| 141 | select SHA384_MBEDTLS if SHA384 |
| 142 | select SPL_MD5_MBEDTLS if SPL_MD5 |
| 143 | select SPL_SHA1_MBEDTLS if SPL_SHA1 |
| 144 | select SPL_SHA256_MBEDTLS if SPL_SHA256 |
| 145 | select SPL_SHA512_MBEDTLS if SPL_SHA512 |
| 146 | select SPL_SHA384_MBEDTLS if SPL_SHA384 |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 147 | help |
| 148 | Enable MbedTLS crypto libraries. |
| 149 | Mutually incompatible with MBEDTLS_LIB_CRYPTO_ALT. |
| 150 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 151 | if MBEDTLS_LIB_CRYPTO |
| 152 | |
| 153 | config SHA1_MBEDTLS |
| 154 | bool "Enable SHA1 support with MbedTLS crypto library" |
| 155 | depends on MBEDTLS_LIB_CRYPTO && SHA1 |
| 156 | help |
| 157 | This option enables support of hashing using SHA1 algorithm |
| 158 | with MbedTLS crypto library. |
| 159 | |
| 160 | config SHA256_MBEDTLS |
| 161 | bool "Enable SHA256 support with MbedTLS crypto library" |
| 162 | depends on MBEDTLS_LIB_CRYPTO && SHA256 |
| 163 | help |
| 164 | This option enables support of hashing using SHA256 algorithm |
| 165 | with MbedTLS crypto library. |
| 166 | |
Raymond Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame^] | 167 | if SHA256_MBEDTLS |
| 168 | |
| 169 | config SHA256_SMALLER |
| 170 | bool "Enable SHA256 smaller implementation with MbedTLS crypto library" |
| 171 | depends on SHA256_MBEDTLS |
| 172 | default y if SHA256_MBEDTLS |
| 173 | help |
| 174 | This option enables support of hashing using SHA256 algorithm |
| 175 | smaller implementation with MbedTLS crypto library. |
| 176 | |
| 177 | endif |
| 178 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 179 | config SHA512_MBEDTLS |
| 180 | bool "Enable SHA512 support with MbedTLS crypto library" |
| 181 | depends on MBEDTLS_LIB_CRYPTO && SHA512 |
| 182 | default y if TI_SECURE_DEVICE && FIT_SIGNATURE |
| 183 | help |
| 184 | This option enables support of hashing using SHA512 algorithm |
| 185 | with MbedTLS crypto library. |
| 186 | |
Raymond Mao | 001b613 | 2024-10-03 14:50:20 -0700 | [diff] [blame^] | 187 | if SHA512_MBEDTLS |
| 188 | |
| 189 | config SHA512_SMALLER |
| 190 | bool "Enable SHA512 smaller implementation with MbedTLS crypto library" |
| 191 | depends on SHA512_MBEDTLS |
| 192 | default y if SHA512_MBEDTLS |
| 193 | help |
| 194 | This option enables support of hashing using SHA512 algorithm |
| 195 | smaller implementation with MbedTLS crypto library. |
| 196 | |
| 197 | endif |
| 198 | |
Raymond Mao | f51f355 | 2024-10-03 14:50:19 -0700 | [diff] [blame] | 199 | config SHA384_MBEDTLS |
| 200 | bool "Enable SHA384 support with MbedTLS crypto library" |
| 201 | depends on MBEDTLS_LIB_CRYPTO && SHA384 |
| 202 | select SHA512_MBEDTLS |
| 203 | help |
| 204 | This option enables support of hashing using SHA384 algorithm |
| 205 | with MbedTLS crypto library. |
| 206 | |
| 207 | config MD5_MBEDTLS |
| 208 | bool "Enable MD5 support with MbedTLS crypto library" |
| 209 | depends on MBEDTLS_LIB_CRYPTO && MD5 |
| 210 | help |
| 211 | This option enables support of hashing using MD5 algorithm |
| 212 | with MbedTLS crypto library. |
| 213 | |
| 214 | if SPL |
| 215 | |
| 216 | config SPL_SHA1_MBEDTLS |
| 217 | bool "Enable SHA1 support in SPL with MbedTLS crypto library" |
| 218 | depends on MBEDTLS_LIB_CRYPTO && SPL_SHA1 |
| 219 | help |
| 220 | This option enables support of hashing using SHA1 algorithm |
| 221 | with MbedTLS crypto library. |
| 222 | |
| 223 | config SPL_SHA256_MBEDTLS |
| 224 | bool "Enable SHA256 support in SPL with MbedTLS crypto library" |
| 225 | depends on MBEDTLS_LIB_CRYPTO && SPL_SHA256 |
| 226 | help |
| 227 | This option enables support of hashing using SHA256 algorithm |
| 228 | with MbedTLS crypto library. |
| 229 | |
| 230 | config SPL_SHA512_MBEDTLS |
| 231 | bool "Enable SHA512 support in SPL with MbedTLS crypto library" |
| 232 | depends on MBEDTLS_LIB_CRYPTO && SPL_SHA512 |
| 233 | help |
| 234 | This option enables support of hashing using SHA512 algorithm |
| 235 | with MbedTLS crypto library. |
| 236 | |
| 237 | config SPL_SHA384_MBEDTLS |
| 238 | bool "Enable SHA384 support in SPL with MbedTLS crypto library" |
| 239 | depends on MBEDTLS_LIB_CRYPTO && SPL_SHA384 |
| 240 | select SPL_SHA512 |
| 241 | help |
| 242 | This option enables support of hashing using SHA384 algorithm |
| 243 | with MbedTLS crypto library. |
| 244 | |
| 245 | config SPL_MD5_MBEDTLS |
| 246 | bool "Enable MD5 support in SPL with MbedTLS crypto library" |
| 247 | depends on MBEDTLS_LIB_CRYPTO && SPL_MD5 |
| 248 | help |
| 249 | This option enables support of hashing using MD5 algorithm |
| 250 | with MbedTLS crypto library. |
| 251 | |
| 252 | endif # SPL |
| 253 | |
| 254 | endif # MBEDTLS_LIB_CRYPTO |
Raymond Mao | 87010c3 | 2024-10-03 14:50:15 -0700 | [diff] [blame] | 255 | |
| 256 | config MBEDTLS_LIB_X509 |
| 257 | bool "MbedTLS certificate libraries" |
| 258 | help |
| 259 | Enable MbedTLS certificate libraries. |
| 260 | |
| 261 | endif # MBEDTLS_LIB |