Kconfig 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905
  1. menu "mbedTLS"
  2. choice MBEDTLS_MEM_ALLOC_MODE
  3. prompt "Memory allocation strategy"
  4. default MBEDTLS_INTERNAL_MEM_ALLOC
  5. help
  6. Allocation strategy for mbedTLS, essentially provides ability to
  7. allocate all required dynamic allocations from,
  8. - Internal DRAM memory only
  9. - External SPIRAM memory only
  10. - Either internal or external memory based on default malloc()
  11. behavior in ESP-IDF
  12. - Custom allocation mode, by overwriting calloc()/free() using
  13. mbedtls_platform_set_calloc_free() function
  14. - Internal IRAM memory wherever applicable else internal DRAM
  15. Recommended mode here is always internal (*), since that is most preferred
  16. from security perspective. But if application requirement does not
  17. allow sufficient free internal memory then alternate mode can be
  18. selected.
  19. (*) In case of ESP32-S2/ESP32-S3, hardware allows encryption of external
  20. SPIRAM contents provided hardware flash encryption feature is enabled.
  21. In that case, using external SPIRAM allocation strategy is also safe choice
  22. from security perspective.
  23. config MBEDTLS_INTERNAL_MEM_ALLOC
  24. bool "Internal memory"
  25. config MBEDTLS_EXTERNAL_MEM_ALLOC
  26. bool "External SPIRAM"
  27. depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
  28. config MBEDTLS_DEFAULT_MEM_ALLOC
  29. bool "Default alloc mode"
  30. config MBEDTLS_CUSTOM_MEM_ALLOC
  31. bool "Custom alloc mode"
  32. config MBEDTLS_IRAM_8BIT_MEM_ALLOC
  33. bool "Internal IRAM"
  34. depends on ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
  35. help
  36. Allows to use IRAM memory region as 8bit accessible region.
  37. TLS input and output buffers will be allocated in IRAM section which is 32bit aligned
  38. memory. Every unaligned (8bit or 16bit) access will result in an exception
  39. and incur penalty of certain clock cycles per unaligned read/write.
  40. endchoice #MBEDTLS_MEM_ALLOC_MODE
  41. config MBEDTLS_SSL_MAX_CONTENT_LEN
  42. int "TLS maximum message content length"
  43. default 16384
  44. range 512 16384
  45. depends on !MBEDTLS_ASYMMETRIC_CONTENT_LEN
  46. help
  47. Maximum TLS message length (in bytes) supported by mbedTLS.
  48. 16384 is the default and this value is required to comply
  49. fully with TLS standards.
  50. However you can set a lower value in order to save RAM. This
  51. is safe if the other end of the connection supports Maximum
  52. Fragment Length Negotiation Extension (max_fragment_length,
  53. see RFC6066) or you know for certain that it will never send a
  54. message longer than a certain number of bytes.
  55. If the value is set too low, symptoms are a failed TLS
  56. handshake or a return value of MBEDTLS_ERR_SSL_INVALID_RECORD
  57. (-0x7200).
  58. config MBEDTLS_ASYMMETRIC_CONTENT_LEN
  59. bool "Asymmetric in/out fragment length"
  60. default y
  61. help
  62. If enabled, this option allows customizing TLS in/out fragment length
  63. in asymmetric way. Please note that enabling this with default values
  64. saves 12KB of dynamic memory per TLS connection.
  65. config MBEDTLS_SSL_IN_CONTENT_LEN
  66. int "TLS maximum incoming fragment length"
  67. default 16384
  68. range 512 16384
  69. depends on MBEDTLS_ASYMMETRIC_CONTENT_LEN
  70. help
  71. This defines maximum incoming fragment length, overriding default
  72. maximum content length (MBEDTLS_SSL_MAX_CONTENT_LEN).
  73. config MBEDTLS_SSL_OUT_CONTENT_LEN
  74. int "TLS maximum outgoing fragment length"
  75. default 4096
  76. range 512 16384
  77. depends on MBEDTLS_ASYMMETRIC_CONTENT_LEN
  78. help
  79. This defines maximum outgoing fragment length, overriding default
  80. maximum content length (MBEDTLS_SSL_MAX_CONTENT_LEN).
  81. config MBEDTLS_DYNAMIC_BUFFER
  82. bool "Using dynamic TX/RX buffer"
  83. default n
  84. select MBEDTLS_ASYMMETRIC_CONTENT_LEN
  85. help
  86. Using dynamic TX/RX buffer. After enabling this option, mbedTLS will
  87. allocate TX buffer when need to send data and then free it if all data
  88. is sent, allocate RX buffer when need to receive data and then free it
  89. when all data is used or read by upper layer.
  90. By default, when SSL is initialized, mbedTLS also allocate TX and
  91. RX buffer with the default value of "MBEDTLS_SSL_OUT_CONTENT_LEN" or
  92. "MBEDTLS_SSL_IN_CONTENT_LEN", so to save more heap, users can set
  93. the options to be an appropriate value.
  94. config MBEDTLS_DYNAMIC_FREE_PEER_CERT
  95. bool "Free SSL peer certificate after its usage"
  96. default n
  97. depends on MBEDTLS_DYNAMIC_BUFFER
  98. help
  99. Free peer certificate after its usage in handshake process.
  100. config MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
  101. bool "Free private key and DHM data after its usage"
  102. default n
  103. depends on MBEDTLS_DYNAMIC_BUFFER
  104. help
  105. Free private key and DHM data after its usage in handshake process.
  106. The option will decrease heap cost when handshake, but also lead to problem:
  107. Becasue all certificate, private key and DHM data are freed so users should register
  108. certificate and private key to ssl config object again.
  109. config MBEDTLS_DYNAMIC_FREE_CA_CERT
  110. bool "Free SSL ca certificate after its usage"
  111. default y
  112. depends on MBEDTLS_DYNAMIC_FREE_CONFIG_DATA
  113. help
  114. Free ca certificate after its usage in the handshake process.
  115. This option will decrease the heap footprint for the TLS handshake, but may lead to a problem:
  116. If the respective ssl object needs to perform the TLS handshake again,
  117. the ca certificate should once again be registered to the ssl object.
  118. config MBEDTLS_DEBUG
  119. bool "Enable mbedTLS debugging"
  120. default n
  121. help
  122. Enable mbedTLS debugging functions at compile time.
  123. If this option is enabled, you can include
  124. "mbedtls/esp_debug.h" and call mbedtls_esp_enable_debug_log()
  125. at runtime in order to enable mbedTLS debug output via the ESP
  126. log mechanism.
  127. choice MBEDTLS_DEBUG_LEVEL
  128. bool "Set mbedTLS debugging level"
  129. depends on MBEDTLS_DEBUG
  130. default MBEDTLS_DEBUG_LEVEL_VERBOSE
  131. help
  132. Set mbedTLS debugging level
  133. config MBEDTLS_DEBUG_LEVEL_WARN
  134. bool "Warning"
  135. config MBEDTLS_DEBUG_LEVEL_INFO
  136. bool "Info"
  137. config MBEDTLS_DEBUG_LEVEL_DEBUG
  138. bool "Debug"
  139. config MBEDTLS_DEBUG_LEVEL_VERBOSE
  140. bool "Verbose"
  141. endchoice
  142. config MBEDTLS_DEBUG_LEVEL
  143. int
  144. default 1 if MBEDTLS_DEBUG_LEVEL_WARN
  145. default 2 if MBEDTLS_DEBUG_LEVEL_INFO
  146. default 3 if MBEDTLS_DEBUG_LEVEL_DEBUG
  147. default 4 if MBEDTLS_DEBUG_LEVEL_VERBOSE
  148. menu "Certificate Bundle"
  149. config MBEDTLS_CERTIFICATE_BUNDLE
  150. bool "Enable trusted root certificate bundle"
  151. default y
  152. help
  153. Enable support for large number of default root certificates
  154. When enabled this option allows user to store default as well
  155. as customer specific root certificates in compressed format rather
  156. than storing full certificate. For the root certificates the public key and the subject name
  157. will be stored.
  158. choice MBEDTLS_DEFAULT_CERTIFICATE_BUNDLE
  159. bool "Default certificate bundle options"
  160. depends on MBEDTLS_CERTIFICATE_BUNDLE
  161. default MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL
  162. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL
  163. bool "Use the full default certificate bundle"
  164. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN
  165. bool "Use only the most common certificates from the default bundles"
  166. help
  167. Use only the most common certificates from the default bundles, reducing the size with 50%,
  168. while still having around 99% coverage.
  169. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE
  170. bool "Do not use the default certificate bundle"
  171. endchoice
  172. config MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
  173. depends on MBEDTLS_CERTIFICATE_BUNDLE
  174. default n
  175. bool "Add custom certificates to the default bundle"
  176. config MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH
  177. depends on MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
  178. string "Custom certificate bundle path"
  179. help
  180. Name of the custom certificate directory or file. This path is evaluated
  181. relative to the project root directory.
  182. endmenu
  183. config MBEDTLS_ECP_RESTARTABLE
  184. bool "Enable mbedTLS ecp restartable"
  185. default n
  186. help
  187. Enable "non-blocking" ECC operations that can return early and be resumed.
  188. config MBEDTLS_CMAC_C
  189. bool "Enable CMAC mode for block ciphers"
  190. default n
  191. depends on MBEDTLS_AES_C || MBEDTLS_DES_C
  192. help
  193. Enable the CMAC (Cipher-based Message Authentication Code) mode for
  194. block ciphers.
  195. config MBEDTLS_HARDWARE_AES
  196. bool "Enable hardware AES acceleration"
  197. default y
  198. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  199. help
  200. Enable hardware accelerated AES encryption & decryption.
  201. Note that if the ESP32 CPU is running at 240MHz, hardware AES does not
  202. offer any speed boost over software AES.
  203. config MBEDTLS_AES_USE_INTERRUPT
  204. bool "Use interrupt for long AES operations"
  205. depends on !IDF_TARGET_ESP32 && MBEDTLS_HARDWARE_AES
  206. default y
  207. help
  208. Use an interrupt to coordinate long AES operations.
  209. This allows other code to run on the CPU while an AES operation is pending.
  210. Otherwise the CPU busy-waits.
  211. config MBEDTLS_HARDWARE_GCM
  212. bool "Enable partially hardware accelerated GCM"
  213. depends on IDF_TARGET_ESP32S2 && MBEDTLS_HARDWARE_AES
  214. default y
  215. help
  216. Enable partially hardware accelerated GCM. GHASH calculation is still done
  217. in software.
  218. If MBEDTLS_HARDWARE_GCM is disabled and MBEDTLS_HARDWARE_AES is enabled then
  219. mbedTLS will still use the hardware accelerated AES block operation, but
  220. on a single block at a time.
  221. config MBEDTLS_HARDWARE_MPI
  222. bool "Enable hardware MPI (bignum) acceleration"
  223. default y
  224. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  225. help
  226. Enable hardware accelerated multiple precision integer operations.
  227. Hardware accelerated multiplication, modulo multiplication,
  228. and modular exponentiation for up to 4096 bit results.
  229. These operations are used by RSA.
  230. config MBEDTLS_HARDWARE_SHA
  231. bool "Enable hardware SHA acceleration"
  232. default y
  233. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  234. help
  235. Enable hardware accelerated SHA1, SHA256, SHA384 & SHA512 in mbedTLS.
  236. Due to a hardware limitation, on the ESP32 hardware acceleration is only
  237. guaranteed if SHA digests are calculated one at a time. If more
  238. than one SHA digest is calculated at the same time, one will
  239. be calculated fully in hardware and the rest will be calculated
  240. (at least partially calculated) in software. This happens automatically.
  241. SHA hardware acceleration is faster than software in some situations but
  242. slower in others. You should benchmark to find the best setting for you.
  243. config MBEDTLS_ROM_MD5
  244. bool "Use MD5 implementation in ROM"
  245. default y
  246. help
  247. Use ROM MD5 in mbedTLS.
  248. config MBEDTLS_ATCA_HW_ECDSA_SIGN
  249. bool "Enable hardware ECDSA sign acceleration when using ATECC608A"
  250. default n
  251. help
  252. This option enables hardware acceleration for ECDSA sign function, only
  253. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  254. config MBEDTLS_ATCA_HW_ECDSA_VERIFY
  255. bool "Enable hardware ECDSA verify acceleration when using ATECC608A"
  256. default n
  257. help
  258. This option enables hardware acceleration for ECDSA sign function, only
  259. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  260. config MBEDTLS_HAVE_TIME
  261. bool "Enable mbedtls time support"
  262. depends on !ESP_TIME_FUNCS_USE_NONE
  263. default y
  264. help
  265. Enable use of time.h functions (time() and gmtime()) by mbedTLS.
  266. This option doesn't require the system time to be correct, but enables
  267. functionality that requires relative timekeeping - for example periodic
  268. expiry of TLS session tickets or session cache entries.
  269. Disabling this option will save some firmware size, particularly if
  270. the rest of the firmware doesn't call any standard timekeeeping
  271. functions.
  272. config MBEDTLS_HAVE_TIME_DATE
  273. bool "Enable mbedtls certificate expiry check"
  274. depends on MBEDTLS_HAVE_TIME
  275. default n
  276. help
  277. Enables X.509 certificate expiry checks in mbedTLS.
  278. If this option is disabled (default) then X.509 certificate
  279. "valid from" and "valid to" timestamp fields are ignored.
  280. If this option is enabled, these fields are compared with the
  281. current system date and time. The time is retrieved using the
  282. standard time() and gmtime() functions. If the certificate is not
  283. valid for the current system time then verification will fail with
  284. code MBEDTLS_X509_BADCERT_FUTURE or MBEDTLS_X509_BADCERT_EXPIRED.
  285. Enabling this option requires adding functionality in the firmware
  286. to set the system clock to a valid timestamp before using TLS. The
  287. recommended way to do this is via ESP-IDF's SNTP functionality, but
  288. any method can be used.
  289. In the case where only a small number of certificates are trusted by
  290. the device, please carefully consider the tradeoffs of enabling this
  291. option. There may be undesired consequences, for example if all
  292. trusted certificates expire while the device is offline and a TLS
  293. connection is required to update. Or if an issue with the SNTP
  294. server means that the system time is invalid for an extended period
  295. after a reset.
  296. config MBEDTLS_ECDSA_DETERMINISTIC
  297. bool "Enable deterministic ECDSA"
  298. default y
  299. help
  300. Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  301. may result in a compromise of the long-term signing key.
  302. config MBEDTLS_SHA512_C
  303. bool "Enable the SHA-384 and SHA-512 cryptographic hash algorithms"
  304. default y
  305. help
  306. Enable MBEDTLS_SHA512_C adds support for SHA-384 and SHA-512.
  307. choice MBEDTLS_TLS_MODE
  308. bool "TLS Protocol Role"
  309. default MBEDTLS_TLS_SERVER_AND_CLIENT
  310. help
  311. mbedTLS can be compiled with protocol support for the TLS
  312. server, TLS client, or both server and client.
  313. Reducing the number of TLS roles supported saves code size.
  314. config MBEDTLS_TLS_SERVER_AND_CLIENT
  315. bool "Server & Client"
  316. select MBEDTLS_TLS_SERVER
  317. select MBEDTLS_TLS_CLIENT
  318. config MBEDTLS_TLS_SERVER_ONLY
  319. bool "Server"
  320. select MBEDTLS_TLS_SERVER
  321. config MBEDTLS_TLS_CLIENT_ONLY
  322. bool "Client"
  323. select MBEDTLS_TLS_CLIENT
  324. config MBEDTLS_TLS_DISABLED
  325. bool "None"
  326. endchoice
  327. config MBEDTLS_TLS_SERVER
  328. bool
  329. select MBEDTLS_TLS_ENABLED
  330. config MBEDTLS_TLS_CLIENT
  331. bool
  332. select MBEDTLS_TLS_ENABLED
  333. config MBEDTLS_TLS_ENABLED
  334. bool
  335. menu "TLS Key Exchange Methods"
  336. depends on MBEDTLS_TLS_ENABLED
  337. config MBEDTLS_PSK_MODES
  338. bool "Enable pre-shared-key ciphersuites"
  339. default n
  340. help
  341. Enable to show configuration for different types of pre-shared-key TLS authentatication methods.
  342. Leaving this options disabled will save code size if they are not used.
  343. config MBEDTLS_KEY_EXCHANGE_PSK
  344. bool "Enable PSK based ciphersuite modes"
  345. depends on MBEDTLS_PSK_MODES
  346. default n
  347. help
  348. Enable to support symmetric key PSK (pre-shared-key) TLS key exchange modes.
  349. config MBEDTLS_KEY_EXCHANGE_DHE_PSK
  350. bool "Enable DHE-PSK based ciphersuite modes"
  351. depends on MBEDTLS_PSK_MODES
  352. default y
  353. help
  354. Enable to support Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  355. config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
  356. bool "Enable ECDHE-PSK based ciphersuite modes"
  357. depends on MBEDTLS_PSK_MODES && MBEDTLS_ECDH_C
  358. default y
  359. help
  360. Enable to support Elliptic-Curve-Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  361. config MBEDTLS_KEY_EXCHANGE_RSA_PSK
  362. bool "Enable RSA-PSK based ciphersuite modes"
  363. depends on MBEDTLS_PSK_MODES
  364. default y
  365. help
  366. Enable to support RSA PSK (pre-shared-key) TLS authentication modes.
  367. config MBEDTLS_KEY_EXCHANGE_RSA
  368. bool "Enable RSA-only based ciphersuite modes"
  369. default y
  370. help
  371. Enable to support ciphersuites with prefix TLS-RSA-WITH-
  372. config MBEDTLS_KEY_EXCHANGE_DHE_RSA
  373. bool "Enable DHE-RSA based ciphersuite modes"
  374. default y
  375. help
  376. Enable to support ciphersuites with prefix TLS-DHE-RSA-WITH-
  377. config MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
  378. bool "Support Elliptic Curve based ciphersuites"
  379. depends on MBEDTLS_ECP_C
  380. default y
  381. help
  382. Enable to show Elliptic Curve based ciphersuite mode options.
  383. Disabling all Elliptic Curve ciphersuites saves code size and
  384. can give slightly faster TLS handshakes, provided the server supports
  385. RSA-only ciphersuite modes.
  386. config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
  387. bool "Enable ECDHE-RSA based ciphersuite modes"
  388. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  389. default y
  390. help
  391. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  392. config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
  393. bool "Enable ECDHE-ECDSA based ciphersuite modes"
  394. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  395. default y
  396. help
  397. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  398. config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
  399. bool "Enable ECDH-ECDSA based ciphersuite modes"
  400. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  401. default y
  402. help
  403. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  404. config MBEDTLS_KEY_EXCHANGE_ECDH_RSA
  405. bool "Enable ECDH-RSA based ciphersuite modes"
  406. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  407. default y
  408. help
  409. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  410. config MBEDTLS_KEY_EXCHANGE_ECJPAKE
  411. bool "Enable ECJPAKE based ciphersuite modes"
  412. depends on MBEDTLS_ECJPAKE_C && MBEDTLS_ECP_DP_SECP256R1_ENABLED
  413. default n
  414. help
  415. Enable to support ciphersuites with prefix TLS-ECJPAKE-WITH-
  416. endmenu # TLS key exchange modes
  417. config MBEDTLS_SSL_RENEGOTIATION
  418. bool "Support TLS renegotiation"
  419. depends on MBEDTLS_TLS_ENABLED
  420. default y
  421. help
  422. The two main uses of renegotiation are (1) refresh keys on long-lived
  423. connections and (2) client authentication after the initial handshake.
  424. If you don't need renegotiation, disabling it will save code size and
  425. reduce the possibility of abuse/vulnerability.
  426. config MBEDTLS_SSL_PROTO_SSL3
  427. bool "Legacy SSL 3.0 support"
  428. depends on MBEDTLS_TLS_ENABLED
  429. default n
  430. help
  431. Support the legacy SSL 3.0 protocol. Most servers will speak a newer
  432. TLS protocol these days.
  433. config MBEDTLS_SSL_PROTO_TLS1
  434. bool "Support TLS 1.0 protocol"
  435. depends on MBEDTLS_TLS_ENABLED
  436. default y
  437. config MBEDTLS_SSL_PROTO_TLS1_1
  438. bool "Support TLS 1.1 protocol"
  439. depends on MBEDTLS_TLS_ENABLED
  440. default y
  441. config MBEDTLS_SSL_PROTO_TLS1_2
  442. bool "Support TLS 1.2 protocol"
  443. depends on MBEDTLS_TLS_ENABLED
  444. default y
  445. config MBEDTLS_SSL_PROTO_GMTSSL1_1
  446. bool "Support GM/T SSL 1.1 protocol"
  447. depends on MBEDTLS_TLS_ENABLED
  448. default n
  449. help
  450. Provisions for GM/T SSL 1.1 support
  451. config MBEDTLS_SSL_PROTO_DTLS
  452. bool "Support DTLS protocol (all versions)"
  453. default n
  454. depends on MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2
  455. help
  456. Requires TLS 1.1 to be enabled for DTLS 1.0
  457. Requires TLS 1.2 to be enabled for DTLS 1.2
  458. config MBEDTLS_SSL_ALPN
  459. bool "Support ALPN (Application Layer Protocol Negotiation)"
  460. depends on MBEDTLS_TLS_ENABLED
  461. default y
  462. help
  463. Disabling this option will save some code size if it is not needed.
  464. config MBEDTLS_CLIENT_SSL_SESSION_TICKETS
  465. bool "TLS: Client Support for RFC 5077 SSL session tickets"
  466. default y
  467. depends on MBEDTLS_TLS_ENABLED
  468. help
  469. Client support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  470. Disabling this option will save some code size.
  471. config MBEDTLS_X509_CHECK_KEY_USAGE
  472. bool "Enable verification of the keyUsage extension"
  473. default y
  474. depends on MBEDTLS_TLS_ENABLED
  475. help
  476. Disabling this avoids problems with mis-issued and/or misused (intermediate) CA and leaf certificates.
  477. Depending on your PKI use, disabling this can be a security risk.
  478. config MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  479. bool "Enable verification of the extendedKeyUsage extension"
  480. default y
  481. depends on MBEDTLS_TLS_ENABLED
  482. help
  483. Disabling this avoids problems with mis-issued and/or misused certificates.
  484. Depending on your PKI use, disabling this can be a security risk.
  485. config MBEDTLS_SERVER_SSL_SESSION_TICKETS
  486. bool "TLS: Server Support for RFC 5077 SSL session tickets"
  487. default y
  488. depends on MBEDTLS_TLS_ENABLED
  489. help
  490. Server support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  491. Disabling this option will save some code size.
  492. menu "Symmetric Ciphers"
  493. config MBEDTLS_AES_C
  494. bool "AES block cipher"
  495. default y
  496. config MBEDTLS_CAMELLIA_C
  497. bool "Camellia block cipher"
  498. default n
  499. config MBEDTLS_DES_C
  500. bool "DES block cipher (legacy, insecure)"
  501. default n
  502. help
  503. Enables the DES block cipher to support 3DES-based TLS ciphersuites.
  504. 3DES is vulnerable to the Sweet32 attack and should only be enabled
  505. if absolutely necessary.
  506. choice MBEDTLS_RC4_MODE
  507. prompt "RC4 Stream Cipher (legacy, insecure)"
  508. default MBEDTLS_RC4_DISABLED
  509. help
  510. ARCFOUR (RC4) stream cipher can be disabled entirely, enabled but not
  511. added to default ciphersuites, or enabled completely.
  512. Please consider the security implications before enabling RC4.
  513. config MBEDTLS_RC4_DISABLED
  514. bool "Disabled"
  515. config MBEDTLS_RC4_ENABLED_NO_DEFAULT
  516. bool "Enabled, not in default ciphersuites"
  517. config MBEDTLS_RC4_ENABLED
  518. bool "Enabled"
  519. endchoice
  520. config MBEDTLS_BLOWFISH_C
  521. bool "Blowfish block cipher (read help)"
  522. default n
  523. help
  524. Enables the Blowfish block cipher (not used for TLS sessions.)
  525. The Blowfish cipher is not used for mbedTLS TLS sessions but can be
  526. used for other purposes. Read up on the limitations of Blowfish (including
  527. Sweet32) before enabling.
  528. config MBEDTLS_XTEA_C
  529. bool "XTEA block cipher"
  530. default n
  531. help
  532. Enables the XTEA block cipher.
  533. config MBEDTLS_CCM_C
  534. bool "CCM (Counter with CBC-MAC) block cipher modes"
  535. default y
  536. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  537. help
  538. Enable Counter with CBC-MAC (CCM) modes for AES and/or Camellia ciphers.
  539. Disabling this option saves some code size.
  540. config MBEDTLS_GCM_C
  541. bool "GCM (Galois/Counter) block cipher modes"
  542. default y
  543. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  544. help
  545. Enable Galois/Counter Mode for AES and/or Camellia ciphers.
  546. This option is generally faster than CCM.
  547. config MBEDTLS_NIST_KW_C
  548. bool "NIST key wrapping (KW) and KW padding (KWP)"
  549. default n
  550. depends on MBEDTLS_AES_C
  551. help
  552. Enable NIST key wrapping and key wrapping padding.
  553. endmenu # Symmetric Ciphers
  554. config MBEDTLS_RIPEMD160_C
  555. bool "Enable RIPEMD-160 hash algorithm"
  556. default n
  557. help
  558. Enable the RIPEMD-160 hash algorithm.
  559. menu "Certificates"
  560. config MBEDTLS_PEM_PARSE_C
  561. bool "Read & Parse PEM formatted certificates"
  562. default y
  563. help
  564. Enable decoding/parsing of PEM formatted certificates.
  565. If your certificates are all in the simpler DER format, disabling
  566. this option will save some code size.
  567. config MBEDTLS_PEM_WRITE_C
  568. bool "Write PEM formatted certificates"
  569. default y
  570. help
  571. Enable writing of PEM formatted certificates.
  572. If writing certificate data only in DER format, disabling this
  573. option will save some code size.
  574. config MBEDTLS_X509_CRL_PARSE_C
  575. bool "X.509 CRL parsing"
  576. default y
  577. help
  578. Support for parsing X.509 Certifificate Revocation Lists.
  579. config MBEDTLS_X509_CSR_PARSE_C
  580. bool "X.509 CSR parsing"
  581. default y
  582. help
  583. Support for parsing X.509 Certifificate Signing Requests
  584. endmenu # Certificates
  585. menuconfig MBEDTLS_ECP_C
  586. bool "Elliptic Curve Ciphers"
  587. default y
  588. config MBEDTLS_ECDH_C
  589. bool "Elliptic Curve Diffie-Hellman (ECDH)"
  590. depends on MBEDTLS_ECP_C
  591. default y
  592. help
  593. Enable ECDH. Needed to use ECDHE-xxx TLS ciphersuites.
  594. config MBEDTLS_ECDSA_C
  595. bool "Elliptic Curve DSA"
  596. depends on MBEDTLS_ECDH_C
  597. default y
  598. help
  599. Enable ECDSA. Needed to use ECDSA-xxx TLS ciphersuites.
  600. config MBEDTLS_ECJPAKE_C
  601. bool "Elliptic curve J-PAKE"
  602. depends on MBEDTLS_ECP_C
  603. default n
  604. help
  605. Enable ECJPAKE. Needed to use ECJPAKE-xxx TLS ciphersuites.
  606. config MBEDTLS_ECP_DP_SECP192R1_ENABLED
  607. bool "Enable SECP192R1 curve"
  608. depends on MBEDTLS_ECP_C
  609. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  610. help
  611. Enable support for SECP192R1 Elliptic Curve.
  612. config MBEDTLS_ECP_DP_SECP224R1_ENABLED
  613. bool "Enable SECP224R1 curve"
  614. depends on MBEDTLS_ECP_C
  615. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  616. help
  617. Enable support for SECP224R1 Elliptic Curve.
  618. config MBEDTLS_ECP_DP_SECP256R1_ENABLED
  619. bool "Enable SECP256R1 curve"
  620. depends on MBEDTLS_ECP_C
  621. default y
  622. help
  623. Enable support for SECP256R1 Elliptic Curve.
  624. config MBEDTLS_ECP_DP_SECP384R1_ENABLED
  625. bool "Enable SECP384R1 curve"
  626. depends on MBEDTLS_ECP_C
  627. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  628. help
  629. Enable support for SECP384R1 Elliptic Curve.
  630. config MBEDTLS_ECP_DP_SECP521R1_ENABLED
  631. bool "Enable SECP521R1 curve"
  632. depends on MBEDTLS_ECP_C
  633. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  634. help
  635. Enable support for SECP521R1 Elliptic Curve.
  636. config MBEDTLS_ECP_DP_SECP192K1_ENABLED
  637. bool "Enable SECP192K1 curve"
  638. depends on MBEDTLS_ECP_C
  639. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  640. help
  641. Enable support for SECP192K1 Elliptic Curve.
  642. config MBEDTLS_ECP_DP_SECP224K1_ENABLED
  643. bool "Enable SECP224K1 curve"
  644. depends on MBEDTLS_ECP_C
  645. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  646. help
  647. Enable support for SECP224K1 Elliptic Curve.
  648. config MBEDTLS_ECP_DP_SECP256K1_ENABLED
  649. bool "Enable SECP256K1 curve"
  650. depends on MBEDTLS_ECP_C
  651. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  652. help
  653. Enable support for SECP256K1 Elliptic Curve.
  654. config MBEDTLS_ECP_DP_BP256R1_ENABLED
  655. bool "Enable BP256R1 curve"
  656. depends on MBEDTLS_ECP_C
  657. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  658. help
  659. support for DP Elliptic Curve.
  660. config MBEDTLS_ECP_DP_BP384R1_ENABLED
  661. bool "Enable BP384R1 curve"
  662. depends on MBEDTLS_ECP_C
  663. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  664. help
  665. support for DP Elliptic Curve.
  666. config MBEDTLS_ECP_DP_BP512R1_ENABLED
  667. bool "Enable BP512R1 curve"
  668. depends on MBEDTLS_ECP_C
  669. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  670. help
  671. support for DP Elliptic Curve.
  672. config MBEDTLS_ECP_DP_CURVE25519_ENABLED
  673. bool "Enable CURVE25519 curve"
  674. depends on MBEDTLS_ECP_C
  675. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  676. help
  677. Enable support for CURVE25519 Elliptic Curve.
  678. config MBEDTLS_ECP_NIST_OPTIM
  679. bool "NIST 'modulo p' optimisations"
  680. depends on MBEDTLS_ECP_C
  681. default y
  682. help
  683. NIST 'modulo p' optimisations increase Elliptic Curve operation performance.
  684. Disabling this option saves some code size.
  685. # end of Elliptic Curve options
  686. config MBEDTLS_POLY1305_C
  687. bool "Poly1305 MAC algorithm"
  688. default n
  689. help
  690. Enable support for Poly1305 MAC algorithm.
  691. config MBEDTLS_CHACHA20_C
  692. bool "Chacha20 stream cipher"
  693. default n
  694. help
  695. Enable support for Chacha20 stream cipher.
  696. config MBEDTLS_CHACHAPOLY_C
  697. bool "ChaCha20-Poly1305 AEAD algorithm"
  698. default n
  699. depends on MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C
  700. help
  701. Enable support for ChaCha20-Poly1305 AEAD algorithm.
  702. config MBEDTLS_HKDF_C
  703. bool "HKDF algorithm (RFC 5869)"
  704. default n
  705. help
  706. Enable support for the Hashed Message Authentication Code
  707. (HMAC)-based key derivation function (HKDF).
  708. config MBEDTLS_THREADING_C
  709. bool "Enable the threading abstraction layer"
  710. default n
  711. help
  712. If you do intend to use contexts between threads, you will need to enable
  713. this layer to prevent race conditions.
  714. config MBEDTLS_THREADING_ALT
  715. bool "Enable threading alternate implementation"
  716. depends on MBEDTLS_THREADING_C
  717. default y
  718. help
  719. Enable threading alt to allow your own alternate threading implementation.
  720. config MBEDTLS_THREADING_PTHREAD
  721. bool "Enable threading pthread implementation"
  722. depends on MBEDTLS_THREADING_C
  723. default n
  724. help
  725. Enable the pthread wrapper layer for the threading layer.
  726. config MBEDTLS_LARGE_KEY_SOFTWARE_MPI
  727. bool "Fallback to software implementation for larger MPI values"
  728. depends on MBEDTLS_HARDWARE_MPI
  729. default y if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2 # HW max 3072 bits
  730. default n
  731. help
  732. Fallback to software implementation for RSA key lengths
  733. larger than SOC_RSA_MAX_BIT_LEN. If this is not active
  734. then the ESP will be unable to process keys greater
  735. than SOC_RSA_MAX_BIT_LEN.
  736. menuconfig MBEDTLS_SECURITY_RISKS
  737. bool "Show configurations with potential security risks"
  738. default n
  739. config MBEDTLS_ALLOW_UNSUPPORTED_CRITICAL_EXT
  740. bool "X.509 CRT parsing with unsupported critical extensions"
  741. depends on MBEDTLS_SECURITY_RISKS
  742. default n
  743. help
  744. Allow the X.509 certificate parser to load certificates
  745. with unsupported critical extensions
  746. endmenu # mbedTLS