Kconfig 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900
  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. help
  192. Enable the CMAC (Cipher-based Message Authentication Code) mode for
  193. block ciphers.
  194. config MBEDTLS_HARDWARE_AES
  195. bool "Enable hardware AES acceleration"
  196. default n if IDF_TARGET_ESP32S3
  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_ESP32S2 && 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 n if IDF_TARGET_ESP32S3
  224. default y
  225. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  226. help
  227. Enable hardware accelerated multiple precision integer operations.
  228. Hardware accelerated multiplication, modulo multiplication,
  229. and modular exponentiation for up to 4096 bit results.
  230. These operations are used by RSA.
  231. config MBEDTLS_HARDWARE_SHA
  232. bool "Enable hardware SHA acceleration"
  233. default n if IDF_TARGET_ESP32S3
  234. default y
  235. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  236. help
  237. Enable hardware accelerated SHA1, SHA256, SHA384 & SHA512 in mbedTLS.
  238. Due to a hardware limitation, on the ESP32 hardware acceleration is only
  239. guaranteed if SHA digests are calculated one at a time. If more
  240. than one SHA digest is calculated at the same time, one will
  241. be calculated fully in hardware and the rest will be calculated
  242. (at least partially calculated) in software. This happens automatically.
  243. SHA hardware acceleration is faster than software in some situations but
  244. slower in others. You should benchmark to find the best setting for you.
  245. config MBEDTLS_ROM_MD5
  246. bool "Use MD5 implementation in ROM"
  247. default y
  248. help
  249. Use ROM MD5 in mbedTLS.
  250. config MBEDTLS_ATCA_HW_ECDSA_SIGN
  251. bool "Enable hardware ECDSA sign acceleration when using ATECC608A"
  252. default n
  253. help
  254. This option enables hardware acceleration for ECDSA sign function, only
  255. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  256. config MBEDTLS_ATCA_HW_ECDSA_VERIFY
  257. bool "Enable hardware ECDSA verify acceleration when using ATECC608A"
  258. default n
  259. help
  260. This option enables hardware acceleration for ECDSA sign function, only
  261. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  262. config MBEDTLS_HAVE_TIME
  263. bool "Enable mbedtls time support"
  264. depends on !ESP_TIME_FUNCS_USE_NONE
  265. default y
  266. help
  267. Enable use of time.h functions (time() and gmtime()) by mbedTLS.
  268. This option doesn't require the system time to be correct, but enables
  269. functionality that requires relative timekeeping - for example periodic
  270. expiry of TLS session tickets or session cache entries.
  271. Disabling this option will save some firmware size, particularly if
  272. the rest of the firmware doesn't call any standard timekeeeping
  273. functions.
  274. config MBEDTLS_HAVE_TIME_DATE
  275. bool "Enable mbedtls certificate expiry check"
  276. depends on MBEDTLS_HAVE_TIME
  277. default n
  278. help
  279. Enables X.509 certificate expiry checks in mbedTLS.
  280. If this option is disabled (default) then X.509 certificate
  281. "valid from" and "valid to" timestamp fields are ignored.
  282. If this option is enabled, these fields are compared with the
  283. current system date and time. The time is retrieved using the
  284. standard time() and gmtime() functions. If the certificate is not
  285. valid for the current system time then verification will fail with
  286. code MBEDTLS_X509_BADCERT_FUTURE or MBEDTLS_X509_BADCERT_EXPIRED.
  287. Enabling this option requires adding functionality in the firmware
  288. to set the system clock to a valid timestamp before using TLS. The
  289. recommended way to do this is via ESP-IDF's SNTP functionality, but
  290. any method can be used.
  291. In the case where only a small number of certificates are trusted by
  292. the device, please carefully consider the tradeoffs of enabling this
  293. option. There may be undesired consequences, for example if all
  294. trusted certificates expire while the device is offline and a TLS
  295. connection is required to update. Or if an issue with the SNTP
  296. server means that the system time is invalid for an extended period
  297. after a reset.
  298. config MBEDTLS_ECDSA_DETERMINISTIC
  299. bool "Enable deterministic ECDSA"
  300. default y
  301. help
  302. Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  303. may result in a compromise of the long-term signing key.
  304. config MBEDTLS_SHA512_C
  305. bool "Enable the SHA-384 and SHA-512 cryptographic hash algorithms"
  306. default y
  307. help
  308. Enable MBEDTLS_SHA512_C adds support for SHA-384 and SHA-512.
  309. choice MBEDTLS_TLS_MODE
  310. bool "TLS Protocol Role"
  311. default MBEDTLS_TLS_SERVER_AND_CLIENT
  312. help
  313. mbedTLS can be compiled with protocol support for the TLS
  314. server, TLS client, or both server and client.
  315. Reducing the number of TLS roles supported saves code size.
  316. config MBEDTLS_TLS_SERVER_AND_CLIENT
  317. bool "Server & Client"
  318. select MBEDTLS_TLS_SERVER
  319. select MBEDTLS_TLS_CLIENT
  320. config MBEDTLS_TLS_SERVER_ONLY
  321. bool "Server"
  322. select MBEDTLS_TLS_SERVER
  323. config MBEDTLS_TLS_CLIENT_ONLY
  324. bool "Client"
  325. select MBEDTLS_TLS_CLIENT
  326. config MBEDTLS_TLS_DISABLED
  327. bool "None"
  328. endchoice
  329. config MBEDTLS_TLS_SERVER
  330. bool
  331. select MBEDTLS_TLS_ENABLED
  332. config MBEDTLS_TLS_CLIENT
  333. bool
  334. select MBEDTLS_TLS_ENABLED
  335. config MBEDTLS_TLS_ENABLED
  336. bool
  337. menu "TLS Key Exchange Methods"
  338. depends on MBEDTLS_TLS_ENABLED
  339. config MBEDTLS_PSK_MODES
  340. bool "Enable pre-shared-key ciphersuites"
  341. default n
  342. help
  343. Enable to show configuration for different types of pre-shared-key TLS authentatication methods.
  344. Leaving this options disabled will save code size if they are not used.
  345. config MBEDTLS_KEY_EXCHANGE_PSK
  346. bool "Enable PSK based ciphersuite modes"
  347. depends on MBEDTLS_PSK_MODES
  348. default n
  349. help
  350. Enable to support symmetric key PSK (pre-shared-key) TLS key exchange modes.
  351. config MBEDTLS_KEY_EXCHANGE_DHE_PSK
  352. bool "Enable DHE-PSK based ciphersuite modes"
  353. depends on MBEDTLS_PSK_MODES
  354. default y
  355. help
  356. Enable to support Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  357. config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
  358. bool "Enable ECDHE-PSK based ciphersuite modes"
  359. depends on MBEDTLS_PSK_MODES && MBEDTLS_ECDH_C
  360. default y
  361. help
  362. Enable to support Elliptic-Curve-Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  363. config MBEDTLS_KEY_EXCHANGE_RSA_PSK
  364. bool "Enable RSA-PSK based ciphersuite modes"
  365. depends on MBEDTLS_PSK_MODES
  366. default y
  367. help
  368. Enable to support RSA PSK (pre-shared-key) TLS authentication modes.
  369. config MBEDTLS_KEY_EXCHANGE_RSA
  370. bool "Enable RSA-only based ciphersuite modes"
  371. default y
  372. help
  373. Enable to support ciphersuites with prefix TLS-RSA-WITH-
  374. config MBEDTLS_KEY_EXCHANGE_DHE_RSA
  375. bool "Enable DHE-RSA based ciphersuite modes"
  376. default y
  377. help
  378. Enable to support ciphersuites with prefix TLS-DHE-RSA-WITH-
  379. config MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
  380. bool "Support Elliptic Curve based ciphersuites"
  381. depends on MBEDTLS_ECP_C
  382. default y
  383. help
  384. Enable to show Elliptic Curve based ciphersuite mode options.
  385. Disabling all Elliptic Curve ciphersuites saves code size and
  386. can give slightly faster TLS handshakes, provided the server supports
  387. RSA-only ciphersuite modes.
  388. config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
  389. bool "Enable ECDHE-RSA based ciphersuite modes"
  390. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  391. default y
  392. help
  393. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  394. config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
  395. bool "Enable ECDHE-ECDSA based ciphersuite modes"
  396. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  397. default y
  398. help
  399. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  400. config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
  401. bool "Enable ECDH-ECDSA based ciphersuite modes"
  402. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  403. default y
  404. help
  405. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  406. config MBEDTLS_KEY_EXCHANGE_ECDH_RSA
  407. bool "Enable ECDH-RSA based ciphersuite modes"
  408. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  409. default y
  410. help
  411. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  412. config MBEDTLS_KEY_EXCHANGE_ECJPAKE
  413. bool "Enable ECJPAKE based ciphersuite modes"
  414. depends on MBEDTLS_ECJPAKE_C && MBEDTLS_ECP_DP_SECP256R1_ENABLED
  415. default n
  416. help
  417. Enable to support ciphersuites with prefix TLS-ECJPAKE-WITH-
  418. endmenu # TLS key exchange modes
  419. config MBEDTLS_SSL_RENEGOTIATION
  420. bool "Support TLS renegotiation"
  421. depends on MBEDTLS_TLS_ENABLED
  422. default y
  423. help
  424. The two main uses of renegotiation are (1) refresh keys on long-lived
  425. connections and (2) client authentication after the initial handshake.
  426. If you don't need renegotiation, disabling it will save code size and
  427. reduce the possibility of abuse/vulnerability.
  428. config MBEDTLS_SSL_PROTO_SSL3
  429. bool "Legacy SSL 3.0 support"
  430. depends on MBEDTLS_TLS_ENABLED
  431. default n
  432. help
  433. Support the legacy SSL 3.0 protocol. Most servers will speak a newer
  434. TLS protocol these days.
  435. config MBEDTLS_SSL_PROTO_TLS1
  436. bool "Support TLS 1.0 protocol"
  437. depends on MBEDTLS_TLS_ENABLED
  438. default y
  439. config MBEDTLS_SSL_PROTO_TLS1_1
  440. bool "Support TLS 1.1 protocol"
  441. depends on MBEDTLS_TLS_ENABLED
  442. default y
  443. config MBEDTLS_SSL_PROTO_TLS1_2
  444. bool "Support TLS 1.2 protocol"
  445. depends on MBEDTLS_TLS_ENABLED
  446. default y
  447. config MBEDTLS_SSL_PROTO_DTLS
  448. bool "Support DTLS protocol (all versions)"
  449. default n
  450. depends on MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2
  451. help
  452. Requires TLS 1.1 to be enabled for DTLS 1.0
  453. Requires TLS 1.2 to be enabled for DTLS 1.2
  454. config MBEDTLS_SSL_ALPN
  455. bool "Support ALPN (Application Layer Protocol Negotiation)"
  456. depends on MBEDTLS_TLS_ENABLED
  457. default y
  458. help
  459. Disabling this option will save some code size if it is not needed.
  460. config MBEDTLS_CLIENT_SSL_SESSION_TICKETS
  461. bool "TLS: Client Support for RFC 5077 SSL session tickets"
  462. default y
  463. depends on MBEDTLS_TLS_ENABLED
  464. help
  465. Client support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  466. Disabling this option will save some code size.
  467. config MBEDTLS_X509_CHECK_KEY_USAGE
  468. bool "Enable verification of the keyUsage extension"
  469. default y
  470. depends on MBEDTLS_TLS_ENABLED
  471. help
  472. Disabling this avoids problems with mis-issued and/or misused (intermediate) CA and leaf certificates.
  473. Depending on your PKI use, disabling this can be a security risk.
  474. config MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  475. bool "Enable verification of the extendedKeyUsage extension"
  476. default y
  477. depends on MBEDTLS_TLS_ENABLED
  478. help
  479. Disabling this avoids problems with mis-issued and/or misused certificates.
  480. Depending on your PKI use, disabling this can be a security risk.
  481. config MBEDTLS_SERVER_SSL_SESSION_TICKETS
  482. bool "TLS: Server Support for RFC 5077 SSL session tickets"
  483. default y
  484. depends on MBEDTLS_TLS_ENABLED
  485. help
  486. Server support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  487. Disabling this option will save some code size.
  488. menu "Symmetric Ciphers"
  489. config MBEDTLS_AES_C
  490. bool "AES block cipher"
  491. default y
  492. config MBEDTLS_CAMELLIA_C
  493. bool "Camellia block cipher"
  494. default n
  495. config MBEDTLS_DES_C
  496. bool "DES block cipher (legacy, insecure)"
  497. default n
  498. help
  499. Enables the DES block cipher to support 3DES-based TLS ciphersuites.
  500. 3DES is vulnerable to the Sweet32 attack and should only be enabled
  501. if absolutely necessary.
  502. choice MBEDTLS_RC4_MODE
  503. prompt "RC4 Stream Cipher (legacy, insecure)"
  504. default MBEDTLS_RC4_DISABLED
  505. help
  506. ARCFOUR (RC4) stream cipher can be disabled entirely, enabled but not
  507. added to default ciphersuites, or enabled completely.
  508. Please consider the security implications before enabling RC4.
  509. config MBEDTLS_RC4_DISABLED
  510. bool "Disabled"
  511. config MBEDTLS_RC4_ENABLED_NO_DEFAULT
  512. bool "Enabled, not in default ciphersuites"
  513. config MBEDTLS_RC4_ENABLED
  514. bool "Enabled"
  515. endchoice
  516. config MBEDTLS_BLOWFISH_C
  517. bool "Blowfish block cipher (read help)"
  518. default n
  519. help
  520. Enables the Blowfish block cipher (not used for TLS sessions.)
  521. The Blowfish cipher is not used for mbedTLS TLS sessions but can be
  522. used for other purposes. Read up on the limitations of Blowfish (including
  523. Sweet32) before enabling.
  524. config MBEDTLS_XTEA_C
  525. bool "XTEA block cipher"
  526. default n
  527. help
  528. Enables the XTEA block cipher.
  529. config MBEDTLS_CCM_C
  530. bool "CCM (Counter with CBC-MAC) block cipher modes"
  531. default y
  532. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  533. help
  534. Enable Counter with CBC-MAC (CCM) modes for AES and/or Camellia ciphers.
  535. Disabling this option saves some code size.
  536. config MBEDTLS_GCM_C
  537. bool "GCM (Galois/Counter) block cipher modes"
  538. default y
  539. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  540. help
  541. Enable Galois/Counter Mode for AES and/or Camellia ciphers.
  542. This option is generally faster than CCM.
  543. config MBEDTLS_NIST_KW_C
  544. bool "NIST key wrapping (KW) and KW padding (KWP)"
  545. default n
  546. depends on MBEDTLS_AES_C
  547. help
  548. Enable NIST key wrapping and key wrapping padding.
  549. endmenu # Symmetric Ciphers
  550. config MBEDTLS_RIPEMD160_C
  551. bool "Enable RIPEMD-160 hash algorithm"
  552. default n
  553. help
  554. Enable the RIPEMD-160 hash algorithm.
  555. menu "Certificates"
  556. config MBEDTLS_PEM_PARSE_C
  557. bool "Read & Parse PEM formatted certificates"
  558. default y
  559. help
  560. Enable decoding/parsing of PEM formatted certificates.
  561. If your certificates are all in the simpler DER format, disabling
  562. this option will save some code size.
  563. config MBEDTLS_PEM_WRITE_C
  564. bool "Write PEM formatted certificates"
  565. default y
  566. help
  567. Enable writing of PEM formatted certificates.
  568. If writing certificate data only in DER format, disabling this
  569. option will save some code size.
  570. config MBEDTLS_X509_CRL_PARSE_C
  571. bool "X.509 CRL parsing"
  572. default y
  573. help
  574. Support for parsing X.509 Certifificate Revocation Lists.
  575. config MBEDTLS_X509_CSR_PARSE_C
  576. bool "X.509 CSR parsing"
  577. default y
  578. help
  579. Support for parsing X.509 Certifificate Signing Requests
  580. endmenu # Certificates
  581. menuconfig MBEDTLS_ECP_C
  582. bool "Elliptic Curve Ciphers"
  583. default y
  584. config MBEDTLS_ECDH_C
  585. bool "Elliptic Curve Diffie-Hellman (ECDH)"
  586. depends on MBEDTLS_ECP_C
  587. default y
  588. help
  589. Enable ECDH. Needed to use ECDHE-xxx TLS ciphersuites.
  590. config MBEDTLS_ECDSA_C
  591. bool "Elliptic Curve DSA"
  592. depends on MBEDTLS_ECDH_C
  593. default y
  594. help
  595. Enable ECDSA. Needed to use ECDSA-xxx TLS ciphersuites.
  596. config MBEDTLS_ECJPAKE_C
  597. bool "Elliptic curve J-PAKE"
  598. depends on MBEDTLS_ECP_C
  599. default n
  600. help
  601. Enable ECJPAKE. Needed to use ECJPAKE-xxx TLS ciphersuites.
  602. config MBEDTLS_ECP_DP_SECP192R1_ENABLED
  603. bool "Enable SECP192R1 curve"
  604. depends on MBEDTLS_ECP_C
  605. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  606. help
  607. Enable support for SECP192R1 Elliptic Curve.
  608. config MBEDTLS_ECP_DP_SECP224R1_ENABLED
  609. bool "Enable SECP224R1 curve"
  610. depends on MBEDTLS_ECP_C
  611. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  612. help
  613. Enable support for SECP224R1 Elliptic Curve.
  614. config MBEDTLS_ECP_DP_SECP256R1_ENABLED
  615. bool "Enable SECP256R1 curve"
  616. depends on MBEDTLS_ECP_C
  617. default y
  618. help
  619. Enable support for SECP256R1 Elliptic Curve.
  620. config MBEDTLS_ECP_DP_SECP384R1_ENABLED
  621. bool "Enable SECP384R1 curve"
  622. depends on MBEDTLS_ECP_C
  623. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  624. help
  625. Enable support for SECP384R1 Elliptic Curve.
  626. config MBEDTLS_ECP_DP_SECP521R1_ENABLED
  627. bool "Enable SECP521R1 curve"
  628. depends on MBEDTLS_ECP_C
  629. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  630. help
  631. Enable support for SECP521R1 Elliptic Curve.
  632. config MBEDTLS_ECP_DP_SECP192K1_ENABLED
  633. bool "Enable SECP192K1 curve"
  634. depends on MBEDTLS_ECP_C
  635. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  636. help
  637. Enable support for SECP192K1 Elliptic Curve.
  638. config MBEDTLS_ECP_DP_SECP224K1_ENABLED
  639. bool "Enable SECP224K1 curve"
  640. depends on MBEDTLS_ECP_C
  641. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  642. help
  643. Enable support for SECP224K1 Elliptic Curve.
  644. config MBEDTLS_ECP_DP_SECP256K1_ENABLED
  645. bool "Enable SECP256K1 curve"
  646. depends on MBEDTLS_ECP_C
  647. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  648. help
  649. Enable support for SECP256K1 Elliptic Curve.
  650. config MBEDTLS_ECP_DP_BP256R1_ENABLED
  651. bool "Enable BP256R1 curve"
  652. depends on MBEDTLS_ECP_C
  653. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  654. help
  655. support for DP Elliptic Curve.
  656. config MBEDTLS_ECP_DP_BP384R1_ENABLED
  657. bool "Enable BP384R1 curve"
  658. depends on MBEDTLS_ECP_C
  659. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  660. help
  661. support for DP Elliptic Curve.
  662. config MBEDTLS_ECP_DP_BP512R1_ENABLED
  663. bool "Enable BP512R1 curve"
  664. depends on MBEDTLS_ECP_C
  665. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  666. help
  667. support for DP Elliptic Curve.
  668. config MBEDTLS_ECP_DP_CURVE25519_ENABLED
  669. bool "Enable CURVE25519 curve"
  670. depends on MBEDTLS_ECP_C
  671. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  672. help
  673. Enable support for CURVE25519 Elliptic Curve.
  674. config MBEDTLS_ECP_NIST_OPTIM
  675. bool "NIST 'modulo p' optimisations"
  676. depends on MBEDTLS_ECP_C
  677. default y
  678. help
  679. NIST 'modulo p' optimisations increase Elliptic Curve operation performance.
  680. Disabling this option saves some code size.
  681. # end of Elliptic Curve options
  682. config MBEDTLS_POLY1305_C
  683. bool "Poly1305 MAC algorithm"
  684. default n
  685. help
  686. Enable support for Poly1305 MAC algorithm.
  687. config MBEDTLS_CHACHA20_C
  688. bool "Chacha20 stream cipher"
  689. default n
  690. help
  691. Enable support for Chacha20 stream cipher.
  692. config MBEDTLS_CHACHAPOLY_C
  693. bool "ChaCha20-Poly1305 AEAD algorithm"
  694. default n
  695. depends on MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C
  696. help
  697. Enable support for ChaCha20-Poly1305 AEAD algorithm.
  698. config MBEDTLS_HKDF_C
  699. bool "HKDF algorithm (RFC 5869)"
  700. default n
  701. help
  702. Enable support for the Hashed Message Authentication Code
  703. (HMAC)-based key derivation function (HKDF).
  704. config MBEDTLS_THREADING_C
  705. bool "Enable the threading abstraction layer"
  706. default n
  707. help
  708. If you do intend to use contexts between threads, you will need to enable
  709. this layer to prevent race conditions.
  710. config MBEDTLS_THREADING_ALT
  711. bool "Enable threading alternate implementation"
  712. depends on MBEDTLS_THREADING_C
  713. default y
  714. help
  715. Enable threading alt to allow your own alternate threading implementation.
  716. config MBEDTLS_THREADING_PTHREAD
  717. bool "Enable threading pthread implementation"
  718. depends on MBEDTLS_THREADING_C
  719. default n
  720. help
  721. Enable the pthread wrapper layer for the threading layer.
  722. config MBEDTLS_LARGE_KEY_SOFTWARE_MPI
  723. bool "Fallback to software implementation for larger MPI values"
  724. depends on MBEDTLS_HARDWARE_MPI
  725. default y if IDF_TARGET_ESP32C3 # HW max 3072 bits
  726. default n
  727. help
  728. Fallback to software implementation for RSA key lengths
  729. larger than SOC_RSA_MAX_BIT_LEN. If this is not active
  730. then the ESP will be unable to process keys greater
  731. than SOC_RSA_MAX_BIT_LEN.
  732. menuconfig MBEDTLS_SECURITY_RISKS
  733. bool "Show configurations with potential security risks"
  734. default n
  735. config MBEDTLS_ALLOW_UNSUPPORTED_CRITICAL_EXT
  736. bool "X.509 CRT parsing with unsupported critical extensions"
  737. depends on MBEDTLS_SECURITY_RISKS
  738. default n
  739. help
  740. Allow the X.509 certificate parser to load certificates
  741. with unsupported critical extensions
  742. endmenu # mbedTLS