Kconfig 30 KB

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