Kconfig 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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, 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 y
  197. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  198. help
  199. Enable hardware accelerated AES encryption & decryption.
  200. Note that if the ESP32 CPU is running at 240MHz, hardware AES does not
  201. offer any speed boost over software AES.
  202. config MBEDTLS_AES_USE_INTERRUPT
  203. bool "Use interrupt for long AES operations"
  204. depends on IDF_TARGET_ESP32S2 && MBEDTLS_HARDWARE_AES
  205. default y
  206. help
  207. Use an interrupt to coordinate long AES operations.
  208. This allows other code to run on the CPU while an AES operation is pending.
  209. Otherwise the CPU busy-waits.
  210. config MBEDTLS_HARDWARE_GCM
  211. bool "Enable partially hardware accelerated GCM"
  212. depends on IDF_TARGET_ESP32S2 && MBEDTLS_HARDWARE_AES
  213. default y
  214. help
  215. Enable partially hardware accelerated GCM. GHASH calculation is still done
  216. in software.
  217. If MBEDTLS_HARDWARE_GCM is disabled and MBEDTLS_HARDWARE_AES is enabled then
  218. mbedTLS will still use the hardware accelerated AES block operation, but
  219. on a single block at a time.
  220. config MBEDTLS_HARDWARE_MPI
  221. bool "Enable hardware MPI (bignum) acceleration"
  222. default y
  223. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  224. help
  225. Enable hardware accelerated multiple precision integer operations.
  226. Hardware accelerated multiplication, modulo multiplication,
  227. and modular exponentiation for up to 4096 bit results.
  228. These operations are used by RSA.
  229. config MBEDTLS_HARDWARE_SHA
  230. bool "Enable hardware SHA acceleration"
  231. default y
  232. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST
  233. help
  234. Enable hardware accelerated SHA1, SHA256, SHA384 & SHA512 in mbedTLS.
  235. Due to a hardware limitation, on the ESP32 hardware acceleration is only
  236. guaranteed if SHA digests are calculated one at a time. If more
  237. than one SHA digest is calculated at the same time, one will
  238. be calculated fully in hardware and the rest will be calculated
  239. (at least partially calculated) in software. This happens automatically.
  240. SHA hardware acceleration is faster than software in some situations but
  241. slower in others. You should benchmark to find the best setting for you.
  242. config MBEDTLS_ATCA_HW_ECDSA_SIGN
  243. bool "Enable hardware ECDSA sign acceleration when using ATECC608A"
  244. default n
  245. help
  246. This option enables hardware acceleration for ECDSA sign function, only
  247. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  248. config MBEDTLS_ATCA_HW_ECDSA_VERIFY
  249. bool "Enable hardware ECDSA verify 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_HAVE_TIME
  255. bool "Enable mbedtls time"
  256. depends on !ESP32_TIME_SYSCALL_USE_NONE
  257. default y
  258. help
  259. System has time.h and time().
  260. The time does not need to be correct, only time differences are used.
  261. config MBEDTLS_HAVE_TIME_DATE
  262. bool "Enable mbedtls certificate expiry check"
  263. depends on MBEDTLS_HAVE_TIME
  264. default n
  265. help
  266. System has time.h and time(), gmtime() and the clock is correct.
  267. The time needs to be correct (not necesarily very accurate, but at least
  268. the date should be correct). This is used to verify the validity period of
  269. X.509 certificates.
  270. It is suggested that you should get the real time by "SNTP".
  271. config MBEDTLS_ECDSA_DETERMINISTIC
  272. bool "Enable deterministic ECDSA"
  273. default y
  274. help
  275. Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  276. may result in a compromise of the long-term signing key.
  277. config MBEDTLS_SHA512_C
  278. bool "Enable the SHA-384 and SHA-512 cryptographic hash algorithms"
  279. default y
  280. help
  281. Enable MBEDTLS_SHA512_C adds support for SHA-384 and SHA-512.
  282. choice MBEDTLS_TLS_MODE
  283. bool "TLS Protocol Role"
  284. default MBEDTLS_TLS_SERVER_AND_CLIENT
  285. help
  286. mbedTLS can be compiled with protocol support for the TLS
  287. server, TLS client, or both server and client.
  288. Reducing the number of TLS roles supported saves code size.
  289. config MBEDTLS_TLS_SERVER_AND_CLIENT
  290. bool "Server & Client"
  291. select MBEDTLS_TLS_SERVER
  292. select MBEDTLS_TLS_CLIENT
  293. config MBEDTLS_TLS_SERVER_ONLY
  294. bool "Server"
  295. select MBEDTLS_TLS_SERVER
  296. config MBEDTLS_TLS_CLIENT_ONLY
  297. bool "Client"
  298. select MBEDTLS_TLS_CLIENT
  299. config MBEDTLS_TLS_DISABLED
  300. bool "None"
  301. endchoice
  302. config MBEDTLS_TLS_SERVER
  303. bool
  304. select MBEDTLS_TLS_ENABLED
  305. config MBEDTLS_TLS_CLIENT
  306. bool
  307. select MBEDTLS_TLS_ENABLED
  308. config MBEDTLS_TLS_ENABLED
  309. bool
  310. menu "TLS Key Exchange Methods"
  311. depends on MBEDTLS_TLS_ENABLED
  312. config MBEDTLS_PSK_MODES
  313. bool "Enable pre-shared-key ciphersuites"
  314. default n
  315. help
  316. Enable to show configuration for different types of pre-shared-key TLS authentatication methods.
  317. Leaving this options disabled will save code size if they are not used.
  318. config MBEDTLS_KEY_EXCHANGE_PSK
  319. bool "Enable PSK based ciphersuite modes"
  320. depends on MBEDTLS_PSK_MODES
  321. default n
  322. help
  323. Enable to support symmetric key PSK (pre-shared-key) TLS key exchange modes.
  324. config MBEDTLS_KEY_EXCHANGE_DHE_PSK
  325. bool "Enable DHE-PSK based ciphersuite modes"
  326. depends on MBEDTLS_PSK_MODES
  327. default y
  328. help
  329. Enable to support Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  330. config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
  331. bool "Enable ECDHE-PSK based ciphersuite modes"
  332. depends on MBEDTLS_PSK_MODES && MBEDTLS_ECDH_C
  333. default y
  334. help
  335. Enable to support Elliptic-Curve-Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  336. config MBEDTLS_KEY_EXCHANGE_RSA_PSK
  337. bool "Enable RSA-PSK based ciphersuite modes"
  338. depends on MBEDTLS_PSK_MODES
  339. default y
  340. help
  341. Enable to support RSA PSK (pre-shared-key) TLS authentication modes.
  342. config MBEDTLS_KEY_EXCHANGE_RSA
  343. bool "Enable RSA-only based ciphersuite modes"
  344. default y
  345. help
  346. Enable to support ciphersuites with prefix TLS-RSA-WITH-
  347. config MBEDTLS_KEY_EXCHANGE_DHE_RSA
  348. bool "Enable DHE-RSA based ciphersuite modes"
  349. default y
  350. help
  351. Enable to support ciphersuites with prefix TLS-DHE-RSA-WITH-
  352. config MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
  353. bool "Support Elliptic Curve based ciphersuites"
  354. depends on MBEDTLS_ECP_C
  355. default y
  356. help
  357. Enable to show Elliptic Curve based ciphersuite mode options.
  358. Disabling all Elliptic Curve ciphersuites saves code size and
  359. can give slightly faster TLS handshakes, provided the server supports
  360. RSA-only ciphersuite modes.
  361. config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
  362. bool "Enable ECDHE-RSA based ciphersuite modes"
  363. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  364. default y
  365. help
  366. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  367. config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
  368. bool "Enable ECDHE-ECDSA based ciphersuite modes"
  369. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  370. default y
  371. help
  372. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  373. config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
  374. bool "Enable ECDH-ECDSA based ciphersuite modes"
  375. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  376. default y
  377. help
  378. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  379. config MBEDTLS_KEY_EXCHANGE_ECDH_RSA
  380. bool "Enable ECDH-RSA based ciphersuite modes"
  381. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  382. default y
  383. help
  384. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  385. config MBEDTLS_KEY_EXCHANGE_ECJPAKE
  386. bool "Enable ECJPAKE based ciphersuite modes"
  387. depends on MBEDTLS_ECJPAKE_C && MBEDTLS_ECP_DP_SECP256R1_ENABLED
  388. default n
  389. help
  390. Enable to support ciphersuites with prefix TLS-ECJPAKE-WITH-
  391. endmenu # TLS key exchange modes
  392. config MBEDTLS_SSL_RENEGOTIATION
  393. bool "Support TLS renegotiation"
  394. depends on MBEDTLS_TLS_ENABLED
  395. default y
  396. help
  397. The two main uses of renegotiation are (1) refresh keys on long-lived
  398. connections and (2) client authentication after the initial handshake.
  399. If you don't need renegotiation, disabling it will save code size and
  400. reduce the possibility of abuse/vulnerability.
  401. config MBEDTLS_SSL_PROTO_SSL3
  402. bool "Legacy SSL 3.0 support"
  403. depends on MBEDTLS_TLS_ENABLED
  404. default n
  405. help
  406. Support the legacy SSL 3.0 protocol. Most servers will speak a newer
  407. TLS protocol these days.
  408. config MBEDTLS_SSL_PROTO_TLS1
  409. bool "Support TLS 1.0 protocol"
  410. depends on MBEDTLS_TLS_ENABLED
  411. default y
  412. config MBEDTLS_SSL_PROTO_TLS1_1
  413. bool "Support TLS 1.1 protocol"
  414. depends on MBEDTLS_TLS_ENABLED
  415. default y
  416. config MBEDTLS_SSL_PROTO_TLS1_2
  417. bool "Support TLS 1.2 protocol"
  418. depends on MBEDTLS_TLS_ENABLED
  419. default y
  420. config MBEDTLS_SSL_PROTO_DTLS
  421. bool "Support DTLS protocol (all versions)"
  422. default n
  423. depends on MBEDTLS_SSL_PROTO_TLS1_1 || MBEDTLS_SSL_PROTO_TLS1_2
  424. help
  425. Requires TLS 1.1 to be enabled for DTLS 1.0
  426. Requires TLS 1.2 to be enabled for DTLS 1.2
  427. config MBEDTLS_SSL_ALPN
  428. bool "Support ALPN (Application Layer Protocol Negotiation)"
  429. depends on MBEDTLS_TLS_ENABLED
  430. default y
  431. help
  432. Disabling this option will save some code size if it is not needed.
  433. config MBEDTLS_CLIENT_SSL_SESSION_TICKETS
  434. bool "TLS: Client Support for RFC 5077 SSL session tickets"
  435. default y
  436. depends on MBEDTLS_TLS_ENABLED
  437. help
  438. Client support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  439. Disabling this option will save some code size.
  440. config MBEDTLS_SERVER_SSL_SESSION_TICKETS
  441. bool "TLS: Server Support for RFC 5077 SSL session tickets"
  442. default y
  443. depends on MBEDTLS_TLS_ENABLED
  444. help
  445. Server support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  446. Disabling this option will save some code size.
  447. menu "Symmetric Ciphers"
  448. config MBEDTLS_AES_C
  449. bool "AES block cipher"
  450. default y
  451. config MBEDTLS_CAMELLIA_C
  452. bool "Camellia block cipher"
  453. default n
  454. config MBEDTLS_DES_C
  455. bool "DES block cipher (legacy, insecure)"
  456. default n
  457. help
  458. Enables the DES block cipher to support 3DES-based TLS ciphersuites.
  459. 3DES is vulnerable to the Sweet32 attack and should only be enabled
  460. if absolutely necessary.
  461. choice MBEDTLS_RC4_MODE
  462. prompt "RC4 Stream Cipher (legacy, insecure)"
  463. default MBEDTLS_RC4_DISABLED
  464. help
  465. ARCFOUR (RC4) stream cipher can be disabled entirely, enabled but not
  466. added to default ciphersuites, or enabled completely.
  467. Please consider the security implications before enabling RC4.
  468. config MBEDTLS_RC4_DISABLED
  469. bool "Disabled"
  470. config MBEDTLS_RC4_ENABLED_NO_DEFAULT
  471. bool "Enabled, not in default ciphersuites"
  472. config MBEDTLS_RC4_ENABLED
  473. bool "Enabled"
  474. endchoice
  475. config MBEDTLS_BLOWFISH_C
  476. bool "Blowfish block cipher (read help)"
  477. default n
  478. help
  479. Enables the Blowfish block cipher (not used for TLS sessions.)
  480. The Blowfish cipher is not used for mbedTLS TLS sessions but can be
  481. used for other purposes. Read up on the limitations of Blowfish (including
  482. Sweet32) before enabling.
  483. config MBEDTLS_XTEA_C
  484. bool "XTEA block cipher"
  485. default n
  486. help
  487. Enables the XTEA block cipher.
  488. config MBEDTLS_CCM_C
  489. bool "CCM (Counter with CBC-MAC) block cipher modes"
  490. default y
  491. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  492. help
  493. Enable Counter with CBC-MAC (CCM) modes for AES and/or Camellia ciphers.
  494. Disabling this option saves some code size.
  495. config MBEDTLS_GCM_C
  496. bool "GCM (Galois/Counter) block cipher modes"
  497. default y
  498. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  499. help
  500. Enable Galois/Counter Mode for AES and/or Camellia ciphers.
  501. This option is generally faster than CCM.
  502. endmenu # Symmetric Ciphers
  503. config MBEDTLS_RIPEMD160_C
  504. bool "Enable RIPEMD-160 hash algorithm"
  505. default n
  506. help
  507. Enable the RIPEMD-160 hash algorithm.
  508. menu "Certificates"
  509. config MBEDTLS_PEM_PARSE_C
  510. bool "Read & Parse PEM formatted certificates"
  511. default y
  512. help
  513. Enable decoding/parsing of PEM formatted certificates.
  514. If your certificates are all in the simpler DER format, disabling
  515. this option will save some code size.
  516. config MBEDTLS_PEM_WRITE_C
  517. bool "Write PEM formatted certificates"
  518. default y
  519. help
  520. Enable writing of PEM formatted certificates.
  521. If writing certificate data only in DER format, disabling this
  522. option will save some code size.
  523. config MBEDTLS_X509_CRL_PARSE_C
  524. bool "X.509 CRL parsing"
  525. default y
  526. help
  527. Support for parsing X.509 Certifificate Revocation Lists.
  528. config MBEDTLS_X509_CSR_PARSE_C
  529. bool "X.509 CSR parsing"
  530. default y
  531. help
  532. Support for parsing X.509 Certifificate Signing Requests
  533. endmenu # Certificates
  534. menuconfig MBEDTLS_ECP_C
  535. bool "Elliptic Curve Ciphers"
  536. default y
  537. config MBEDTLS_ECDH_C
  538. bool "Elliptic Curve Diffie-Hellman (ECDH)"
  539. depends on MBEDTLS_ECP_C
  540. default y
  541. help
  542. Enable ECDH. Needed to use ECDHE-xxx TLS ciphersuites.
  543. config MBEDTLS_ECDSA_C
  544. bool "Elliptic Curve DSA"
  545. depends on MBEDTLS_ECDH_C
  546. default y
  547. help
  548. Enable ECDSA. Needed to use ECDSA-xxx TLS ciphersuites.
  549. config MBEDTLS_ECJPAKE_C
  550. bool "Elliptic curve J-PAKE"
  551. depends on MBEDTLS_ECP_C
  552. default n
  553. help
  554. Enable ECJPAKE. Needed to use ECJPAKE-xxx TLS ciphersuites.
  555. config MBEDTLS_ECP_DP_SECP192R1_ENABLED
  556. bool "Enable SECP192R1 curve"
  557. depends on MBEDTLS_ECP_C
  558. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  559. help
  560. Enable support for SECP192R1 Elliptic Curve.
  561. config MBEDTLS_ECP_DP_SECP224R1_ENABLED
  562. bool "Enable SECP224R1 curve"
  563. depends on MBEDTLS_ECP_C
  564. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  565. help
  566. Enable support for SECP224R1 Elliptic Curve.
  567. config MBEDTLS_ECP_DP_SECP256R1_ENABLED
  568. bool "Enable SECP256R1 curve"
  569. depends on MBEDTLS_ECP_C
  570. default y
  571. help
  572. Enable support for SECP256R1 Elliptic Curve.
  573. config MBEDTLS_ECP_DP_SECP384R1_ENABLED
  574. bool "Enable SECP384R1 curve"
  575. depends on MBEDTLS_ECP_C
  576. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  577. help
  578. Enable support for SECP384R1 Elliptic Curve.
  579. config MBEDTLS_ECP_DP_SECP521R1_ENABLED
  580. bool "Enable SECP521R1 curve"
  581. depends on MBEDTLS_ECP_C
  582. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  583. help
  584. Enable support for SECP521R1 Elliptic Curve.
  585. config MBEDTLS_ECP_DP_SECP192K1_ENABLED
  586. bool "Enable SECP192K1 curve"
  587. depends on MBEDTLS_ECP_C
  588. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  589. help
  590. Enable support for SECP192K1 Elliptic Curve.
  591. config MBEDTLS_ECP_DP_SECP224K1_ENABLED
  592. bool "Enable SECP224K1 curve"
  593. depends on MBEDTLS_ECP_C
  594. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  595. help
  596. Enable support for SECP224K1 Elliptic Curve.
  597. config MBEDTLS_ECP_DP_SECP256K1_ENABLED
  598. bool "Enable SECP256K1 curve"
  599. depends on MBEDTLS_ECP_C
  600. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  601. help
  602. Enable support for SECP256K1 Elliptic Curve.
  603. config MBEDTLS_ECP_DP_BP256R1_ENABLED
  604. bool "Enable BP256R1 curve"
  605. depends on MBEDTLS_ECP_C
  606. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  607. help
  608. support for DP Elliptic Curve.
  609. config MBEDTLS_ECP_DP_BP384R1_ENABLED
  610. bool "Enable BP384R1 curve"
  611. depends on MBEDTLS_ECP_C
  612. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  613. help
  614. support for DP Elliptic Curve.
  615. config MBEDTLS_ECP_DP_BP512R1_ENABLED
  616. bool "Enable BP512R1 curve"
  617. depends on MBEDTLS_ECP_C
  618. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  619. help
  620. support for DP Elliptic Curve.
  621. config MBEDTLS_ECP_DP_CURVE25519_ENABLED
  622. bool "Enable CURVE25519 curve"
  623. depends on MBEDTLS_ECP_C
  624. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  625. help
  626. Enable support for CURVE25519 Elliptic Curve.
  627. config MBEDTLS_ECP_NIST_OPTIM
  628. bool "NIST 'modulo p' optimisations"
  629. depends on MBEDTLS_ECP_C
  630. default y
  631. help
  632. NIST 'modulo p' optimisations increase Elliptic Curve operation performance.
  633. Disabling this option saves some code size.
  634. # end of Elliptic Curve options
  635. config MBEDTLS_POLY1305_C
  636. bool "Poly1305 MAC algorithm"
  637. default n
  638. help
  639. Enable support for Poly1305 MAC algorithm.
  640. config MBEDTLS_CHACHA20_C
  641. bool "Chacha20 stream cipher"
  642. default n
  643. help
  644. Enable support for Chacha20 stream cipher.
  645. config MBEDTLS_CHACHAPOLY_C
  646. bool "ChaCha20-Poly1305 AEAD algorithm"
  647. default n
  648. depends on MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C
  649. help
  650. Enable support for ChaCha20-Poly1305 AEAD algorithm.
  651. config MBEDTLS_HKDF_C
  652. bool "HKDF algorithm (RFC 5869)"
  653. default n
  654. help
  655. Enable support for the Hashed Message Authentication Code
  656. (HMAC)-based key derivation function (HKDF).
  657. config MBEDTLS_THREADING_C
  658. bool "Enable the threading abstraction layer"
  659. default n
  660. help
  661. If you do intend to use contexts between threads, you will need to enable
  662. this layer to prevent race conditions.
  663. config MBEDTLS_THREADING_ALT
  664. bool "Enable threading alternate implementation"
  665. depends on MBEDTLS_THREADING_C
  666. default y
  667. help
  668. Enable threading alt to allow your own alternate threading implementation.
  669. config MBEDTLS_THREADING_PTHREAD
  670. bool "Enable threading pthread implementation"
  671. depends on MBEDTLS_THREADING_C
  672. default n
  673. help
  674. Enable the pthread wrapper layer for the threading layer.
  675. menuconfig MBEDTLS_SECURITY_RISKS
  676. bool "Show configurations with potential security risks"
  677. default n
  678. config MBEDTLS_ALLOW_UNSUPPORTED_CRITICAL_EXT
  679. bool "X.509 CRT parsing with unsupported critical extensions"
  680. depends on MBEDTLS_SECURITY_RISKS
  681. default n
  682. help
  683. Allow the X.509 certificate parser to load certificates
  684. with unsupported critical extensions
  685. endmenu # mbedTLS