Kconfig 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112
  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. # Dynamic buffer feature is not supported with DTLS
  86. depends on !IDF_TARGET_LINUX && !MBEDTLS_SSL_PROTO_DTLS && !MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
  87. help
  88. Using dynamic TX/RX buffer. After enabling this option, mbedTLS will
  89. allocate TX buffer when need to send data and then free it if all data
  90. is sent, allocate RX buffer when need to receive data and then free it
  91. when all data is used or read by upper layer.
  92. By default, when SSL is initialized, mbedTLS also allocate TX and
  93. RX buffer with the default value of "MBEDTLS_SSL_OUT_CONTENT_LEN" or
  94. "MBEDTLS_SSL_IN_CONTENT_LEN", so to save more heap, users can set
  95. the options to be an appropriate value.
  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 "mbedTLS v3.x related"
  145. # NOTE: MBEDTLS_DYNAMIC_BUFFER feature is not supported with TLS 1.3 yet. Ref: IDF-4762
  146. config MBEDTLS_SSL_PROTO_TLS1_3
  147. bool "Support TLS 1.3 protocol"
  148. depends on MBEDTLS_TLS_ENABLED && MBEDTLS_SSL_KEEP_PEER_CERTIFICATE && !MBEDTLS_DYNAMIC_BUFFER
  149. select MBEDTLS_HKDF_C
  150. default n
  151. menu "TLS 1.3 related configurations"
  152. depends on MBEDTLS_SSL_PROTO_TLS1_3
  153. config MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
  154. bool "TLS 1.3 middlebox compatibility mode"
  155. default y
  156. config MBEDTLS_SSL_TLS1_3_KEXM_PSK
  157. bool "TLS 1.3 PSK key exchange mode"
  158. default y
  159. config MBEDTLS_SSL_TLS1_3_KEXM_EPHEMERAL
  160. bool "TLS 1.3 ephemeral key exchange mode"
  161. default y
  162. config MBEDTLS_SSL_TLS1_3_KEXM_PSK_EPHEMERAL
  163. bool "TLS 1.3 PSK ephemeral key exchange mode"
  164. default y
  165. endmenu
  166. config MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
  167. bool "Variable SSL buffer length"
  168. default n
  169. help
  170. This enables the SSL buffer to be resized automatically
  171. based on the negotiated maximum fragment length in each direction.
  172. config MBEDTLS_ECDH_LEGACY_CONTEXT
  173. bool "Use a backward compatible ECDH context (Experimental)"
  174. default n
  175. depends on MBEDTLS_ECDH_C && MBEDTLS_ECP_RESTARTABLE
  176. help
  177. Use the legacy ECDH context format.
  178. Define this option only if you enable MBEDTLS_ECP_RESTARTABLE or if you
  179. want to access ECDH context fields directly.
  180. config MBEDTLS_X509_TRUSTED_CERT_CALLBACK
  181. bool "Enable trusted certificate callbacks"
  182. default n
  183. help
  184. Enables users to configure the set of trusted certificates
  185. through a callback instead of a linked list.
  186. See mbedTLS documentation for required API and more details.
  187. config MBEDTLS_SSL_CONTEXT_SERIALIZATION
  188. bool "Enable serialization of the TLS context structures"
  189. default n
  190. depends on MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C
  191. help
  192. Enable serialization of the TLS context structures
  193. This is a local optimization in handling a single, potentially long-lived connection.
  194. See mbedTLS documentation for required API and more details.
  195. Disabling this option will save some code size.
  196. config MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
  197. bool "Keep peer certificate after handshake completion"
  198. default y
  199. help
  200. Keep the peer's certificate after completion of the handshake.
  201. Disabling this option will save about 4kB of heap and some code size.
  202. See mbedTLS documentation for required API and more details.
  203. config MBEDTLS_PKCS7_C
  204. bool "Enable PKCS #7"
  205. default y
  206. depends on MBEDTLS_X509_CRL_PARSE_C
  207. help
  208. Enable PKCS #7 core for using PKCS #7-formatted signatures.
  209. config MBEDTLS_SSL_CID_PADDING_GRANULARITY
  210. int "Record plaintext padding"
  211. default 16
  212. range 0 32
  213. depends on MBEDTLS_SSL_PROTO_TLS1_3 || MBEDTLS_SSL_DTLS_CONNECTION_ID
  214. help
  215. Controls the use of record plaintext padding in TLS 1.3 and
  216. when using the Connection ID extension in DTLS 1.2.
  217. The padding will always be chosen so that the length of the
  218. padded plaintext is a multiple of the value of this option.
  219. Notes:
  220. A value of 1 means that no padding will be used for outgoing records.
  221. On systems lacking division instructions, a power of two should be preferred.
  222. menu "DTLS-based configurations"
  223. depends on MBEDTLS_SSL_PROTO_DTLS
  224. config MBEDTLS_SSL_DTLS_CONNECTION_ID
  225. bool "Support for the DTLS Connection ID extension"
  226. default n
  227. help
  228. Enable support for the DTLS Connection ID extension which allows to
  229. identify DTLS connections across changes in the underlying transport.
  230. config MBEDTLS_SSL_CID_IN_LEN_MAX
  231. int "Maximum length of CIDs used for incoming DTLS messages"
  232. default 32
  233. range 0 32
  234. depends on MBEDTLS_SSL_DTLS_CONNECTION_ID
  235. help
  236. Maximum length of CIDs used for incoming DTLS messages
  237. config MBEDTLS_SSL_CID_OUT_LEN_MAX
  238. int "Maximum length of CIDs used for outgoing DTLS messages"
  239. default 32
  240. range 0 32
  241. depends on MBEDTLS_SSL_DTLS_CONNECTION_ID
  242. help
  243. Maximum length of CIDs used for outgoing DTLS messages
  244. config MBEDTLS_SSL_DTLS_SRTP
  245. bool "Enable support for negotiation of DTLS-SRTP (RFC 5764)"
  246. default n
  247. help
  248. Enable support for negotiation of DTLS-SRTP (RFC 5764) through the use_srtp extension.
  249. See mbedTLS documentation for required API and more details.
  250. Disabling this option will save some code size.
  251. endmenu
  252. endmenu
  253. menu "Certificate Bundle"
  254. config MBEDTLS_CERTIFICATE_BUNDLE
  255. bool "Enable trusted root certificate bundle"
  256. default y
  257. help
  258. Enable support for large number of default root certificates
  259. When enabled this option allows user to store default as well
  260. as customer specific root certificates in compressed format rather
  261. than storing full certificate. For the root certificates the public key and the subject name
  262. will be stored.
  263. choice MBEDTLS_DEFAULT_CERTIFICATE_BUNDLE
  264. bool "Default certificate bundle options"
  265. depends on MBEDTLS_CERTIFICATE_BUNDLE
  266. default MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL
  267. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL
  268. bool "Use the full default certificate bundle"
  269. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN
  270. bool "Use only the most common certificates from the default bundles"
  271. help
  272. Use only the most common certificates from the default bundles, reducing the size with 50%,
  273. while still having around 99% coverage.
  274. config MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE
  275. bool "Do not use the default certificate bundle"
  276. endchoice
  277. config MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
  278. depends on MBEDTLS_CERTIFICATE_BUNDLE
  279. default n
  280. bool "Add custom certificates to the default bundle"
  281. config MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH
  282. depends on MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE
  283. string "Custom certificate bundle path"
  284. help
  285. Name of the custom certificate directory or file. This path is evaluated
  286. relative to the project root directory.
  287. config MBEDTLS_CERTIFICATE_BUNDLE_DEPRECATED_LIST
  288. bool "Add deprecated root certificates"
  289. depends on MBEDTLS_CERTIFICATE_BUNDLE && !MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE
  290. help
  291. Include the deprecated list of root certificates in the bundle.
  292. This list gets updated when a certificate is removed from the Mozilla's
  293. NSS root certificate store. This config can be enabled if you would like
  294. to ensure that none of the certificates that were deployed in the product
  295. are affected because of the update to bundle. In turn, enabling this
  296. config keeps expired, retracted certificates in the bundle and it may
  297. pose a security risk.
  298. - Deprecated cert list may grow based based on sync with upstream bundle
  299. - Deprecated certs would be be removed in ESP-IDF (next) major release
  300. config MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS
  301. int "Maximum no of certificates allowed in certificate bundle"
  302. default 200
  303. depends on MBEDTLS_CERTIFICATE_BUNDLE
  304. endmenu
  305. config MBEDTLS_ECP_RESTARTABLE
  306. bool "Enable mbedTLS ecp restartable"
  307. select MBEDTLS_ECDH_LEGACY_CONTEXT
  308. depends on MBEDTLS_ECP_C
  309. default n
  310. help
  311. Enable "non-blocking" ECC operations that can return early and be resumed.
  312. config MBEDTLS_CMAC_C
  313. bool "Enable CMAC mode for block ciphers"
  314. default n
  315. depends on MBEDTLS_AES_C || MBEDTLS_DES_C
  316. help
  317. Enable the CMAC (Cipher-based Message Authentication Code) mode for
  318. block ciphers.
  319. config MBEDTLS_HARDWARE_AES
  320. bool "Enable hardware AES acceleration"
  321. default y
  322. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && SOC_AES_SUPPORTED
  323. help
  324. Enable hardware accelerated AES encryption & decryption.
  325. Note that if the ESP32 CPU is running at 240MHz, hardware AES does not
  326. offer any speed boost over software AES.
  327. config MBEDTLS_AES_USE_INTERRUPT
  328. bool "Use interrupt for long AES operations"
  329. depends on !IDF_TARGET_ESP32 && MBEDTLS_HARDWARE_AES
  330. default y
  331. help
  332. Use an interrupt to coordinate long AES operations.
  333. This allows other code to run on the CPU while an AES operation is pending.
  334. Otherwise the CPU busy-waits.
  335. config MBEDTLS_AES_INTERRUPT_LEVEL
  336. int "AES hardware interrupt level"
  337. default 0
  338. depends on MBEDTLS_AES_USE_INTERRUPT
  339. range 0 3
  340. help
  341. This config helps to set the interrupt priority level for the AES peripheral.
  342. Value 0 (default) means that there is no preference regarding the interrupt
  343. priority level and any level from 1 to 3 can be selected (based on the availability).
  344. Note: Higher value indicates high interrupt priority.
  345. config MBEDTLS_HARDWARE_GCM
  346. bool "Enable partially hardware accelerated GCM"
  347. depends on SOC_AES_SUPPORT_GCM && MBEDTLS_HARDWARE_AES
  348. default y
  349. help
  350. Enable partially hardware accelerated GCM. GHASH calculation is still done
  351. in software.
  352. If MBEDTLS_HARDWARE_GCM is disabled and MBEDTLS_HARDWARE_AES is enabled then
  353. mbedTLS will still use the hardware accelerated AES block operation, but
  354. on a single block at a time.
  355. config MBEDTLS_HARDWARE_MPI
  356. bool "Enable hardware MPI (bignum) acceleration"
  357. default y
  358. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && SOC_MPI_SUPPORTED
  359. help
  360. Enable hardware accelerated multiple precision integer operations.
  361. Hardware accelerated multiplication, modulo multiplication,
  362. and modular exponentiation for up to SOC_RSA_MAX_BIT_LEN bit results.
  363. These operations are used by RSA.
  364. config MBEDTLS_MPI_USE_INTERRUPT
  365. bool "Use interrupt for MPI exp-mod operations"
  366. depends on !IDF_TARGET_ESP32 && MBEDTLS_HARDWARE_MPI
  367. default y
  368. help
  369. Use an interrupt to coordinate long MPI operations.
  370. This allows other code to run on the CPU while an MPI operation is pending.
  371. Otherwise the CPU busy-waits.
  372. config MBEDTLS_MPI_INTERRUPT_LEVEL
  373. int "MPI hardware interrupt level"
  374. default 0
  375. depends on MBEDTLS_MPI_USE_INTERRUPT
  376. range 0 3
  377. help
  378. This config helps to set the interrupt priority level for the MPI peripheral.
  379. Value 0 (default) means that there is no preference regarding the interrupt
  380. priority level and any level from 1 to 3 can be selected (based on the availability).
  381. Note: Higher value indicates high interrupt priority.
  382. config MBEDTLS_HARDWARE_SHA
  383. bool "Enable hardware SHA acceleration"
  384. default y
  385. depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && SOC_SHA_SUPPORTED
  386. help
  387. Enable hardware accelerated SHA1, SHA256, SHA384 & SHA512 in mbedTLS.
  388. Due to a hardware limitation, on the ESP32 hardware acceleration is only
  389. guaranteed if SHA digests are calculated one at a time. If more
  390. than one SHA digest is calculated at the same time, one will
  391. be calculated fully in hardware and the rest will be calculated
  392. (at least partially calculated) in software. This happens automatically.
  393. SHA hardware acceleration is faster than software in some situations but
  394. slower in others. You should benchmark to find the best setting for you.
  395. config MBEDTLS_HARDWARE_ECC
  396. bool "Enable hardware ECC acceleration"
  397. default y
  398. depends on SOC_ECC_SUPPORTED
  399. help
  400. Enable hardware accelerated ECC point multiplication and point verification for points
  401. on curve SECP192R1 and SECP256R1 in mbedTLS
  402. config MBEDTLS_ECC_OTHER_CURVES_SOFT_FALLBACK
  403. bool "Fallback to software implementation for curves not supported in hardware"
  404. depends on MBEDTLS_HARDWARE_ECC
  405. default y
  406. help
  407. Fallback to software implementation of ECC point multiplication and point verification
  408. for curves not supported in hardware.
  409. config MBEDTLS_ROM_MD5
  410. bool "Use MD5 implementation in ROM"
  411. default y
  412. help
  413. Use ROM MD5 in mbedTLS.
  414. config MBEDTLS_HARDWARE_ECDSA_SIGN
  415. bool "Enable ECDSA signing using on-chip ECDSA peripheral"
  416. default n
  417. depends on SOC_ECDSA_SUPPORTED
  418. help
  419. Enable hardware accelerated ECDSA peripheral to sign data
  420. on curve SECP192R1 and SECP256R1 in mbedTLS.
  421. Note that for signing, the private key has to be burnt in an efuse key block
  422. with key purpose set to ECDSA_KEY.
  423. If no key is burnt, it will report an error
  424. The key should be burnt in little endian format. espefuse.py utility handles it internally
  425. but care needs to be taken while burning using esp_efuse APIs
  426. config MBEDTLS_HARDWARE_ECDSA_VERIFY
  427. bool "Enable ECDSA signature verification using on-chip ECDSA peripheral"
  428. default y
  429. depends on SOC_ECDSA_SUPPORTED
  430. help
  431. Enable hardware accelerated ECDSA peripheral to verify signature
  432. on curve SECP192R1 and SECP256R1 in mbedTLS.
  433. config MBEDTLS_ATCA_HW_ECDSA_SIGN
  434. bool "Enable hardware ECDSA sign acceleration when using ATECC608A"
  435. default n
  436. help
  437. This option enables hardware acceleration for ECDSA sign function, only
  438. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  439. config MBEDTLS_ATCA_HW_ECDSA_VERIFY
  440. bool "Enable hardware ECDSA verify acceleration when using ATECC608A"
  441. default n
  442. help
  443. This option enables hardware acceleration for ECDSA sign function, only
  444. when using ATECC608A cryptoauth chip (integrated with ESP32-WROOM-32SE)
  445. config MBEDTLS_HAVE_TIME
  446. bool "Enable mbedtls time support"
  447. depends on !ESP_TIME_FUNCS_USE_NONE
  448. default y
  449. help
  450. Enable use of time.h functions (time() and gmtime()) by mbedTLS.
  451. This option doesn't require the system time to be correct, but enables
  452. functionality that requires relative timekeeping - for example periodic
  453. expiry of TLS session tickets or session cache entries.
  454. Disabling this option will save some firmware size, particularly if
  455. the rest of the firmware doesn't call any standard timekeeeping
  456. functions.
  457. config MBEDTLS_PLATFORM_TIME_ALT
  458. bool "Enable mbedtls time support: platform-specific"
  459. depends on MBEDTLS_HAVE_TIME
  460. default n
  461. help
  462. Enabling this config will provide users with a function
  463. "mbedtls_platform_set_time()" that allows to set an alternative
  464. time function pointer.
  465. config MBEDTLS_HAVE_TIME_DATE
  466. bool "Enable mbedtls certificate expiry check"
  467. depends on MBEDTLS_HAVE_TIME
  468. default n
  469. help
  470. Enables X.509 certificate expiry checks in mbedTLS.
  471. If this option is disabled (default) then X.509 certificate
  472. "valid from" and "valid to" timestamp fields are ignored.
  473. If this option is enabled, these fields are compared with the
  474. current system date and time. The time is retrieved using the
  475. standard time() and gmtime() functions. If the certificate is not
  476. valid for the current system time then verification will fail with
  477. code MBEDTLS_X509_BADCERT_FUTURE or MBEDTLS_X509_BADCERT_EXPIRED.
  478. Enabling this option requires adding functionality in the firmware
  479. to set the system clock to a valid timestamp before using TLS. The
  480. recommended way to do this is via ESP-IDF's SNTP functionality, but
  481. any method can be used.
  482. In the case where only a small number of certificates are trusted by
  483. the device, please carefully consider the tradeoffs of enabling this
  484. option. There may be undesired consequences, for example if all
  485. trusted certificates expire while the device is offline and a TLS
  486. connection is required to update. Or if an issue with the SNTP
  487. server means that the system time is invalid for an extended period
  488. after a reset.
  489. config MBEDTLS_ECDSA_DETERMINISTIC
  490. bool "Enable deterministic ECDSA"
  491. default y
  492. help
  493. Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  494. may result in a compromise of the long-term signing key.
  495. config MBEDTLS_SHA512_C
  496. bool "Enable the SHA-384 and SHA-512 cryptographic hash algorithms"
  497. default y
  498. help
  499. Enable MBEDTLS_SHA512_C adds support for SHA-384 and SHA-512.
  500. choice MBEDTLS_TLS_MODE
  501. bool "TLS Protocol Role"
  502. default MBEDTLS_TLS_SERVER_AND_CLIENT
  503. help
  504. mbedTLS can be compiled with protocol support for the TLS
  505. server, TLS client, or both server and client.
  506. Reducing the number of TLS roles supported saves code size.
  507. config MBEDTLS_TLS_SERVER_AND_CLIENT
  508. bool "Server & Client"
  509. select MBEDTLS_TLS_SERVER
  510. select MBEDTLS_TLS_CLIENT
  511. config MBEDTLS_TLS_SERVER_ONLY
  512. bool "Server"
  513. select MBEDTLS_TLS_SERVER
  514. config MBEDTLS_TLS_CLIENT_ONLY
  515. bool "Client"
  516. select MBEDTLS_TLS_CLIENT
  517. config MBEDTLS_TLS_DISABLED
  518. bool "None"
  519. endchoice
  520. config MBEDTLS_TLS_SERVER
  521. bool
  522. select MBEDTLS_TLS_ENABLED
  523. config MBEDTLS_TLS_CLIENT
  524. bool
  525. select MBEDTLS_TLS_ENABLED
  526. config MBEDTLS_TLS_ENABLED
  527. bool
  528. menu "TLS Key Exchange Methods"
  529. depends on MBEDTLS_TLS_ENABLED
  530. config MBEDTLS_PSK_MODES
  531. bool "Enable pre-shared-key ciphersuites"
  532. default n
  533. help
  534. Enable to show configuration for different types of pre-shared-key TLS authentatication methods.
  535. Leaving this options disabled will save code size if they are not used.
  536. config MBEDTLS_KEY_EXCHANGE_PSK
  537. bool "Enable PSK based ciphersuite modes"
  538. depends on MBEDTLS_PSK_MODES
  539. default n
  540. help
  541. Enable to support symmetric key PSK (pre-shared-key) TLS key exchange modes.
  542. config MBEDTLS_KEY_EXCHANGE_DHE_PSK
  543. bool "Enable DHE-PSK based ciphersuite modes"
  544. depends on MBEDTLS_PSK_MODES && MBEDTLS_DHM_C
  545. default y
  546. help
  547. Enable to support Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  548. config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK
  549. bool "Enable ECDHE-PSK based ciphersuite modes"
  550. depends on MBEDTLS_PSK_MODES && MBEDTLS_ECDH_C
  551. default y
  552. help
  553. Enable to support Elliptic-Curve-Diffie-Hellman PSK (pre-shared-key) TLS authentication modes.
  554. config MBEDTLS_KEY_EXCHANGE_RSA_PSK
  555. bool "Enable RSA-PSK based ciphersuite modes"
  556. depends on MBEDTLS_PSK_MODES
  557. default y
  558. help
  559. Enable to support RSA PSK (pre-shared-key) TLS authentication modes.
  560. config MBEDTLS_KEY_EXCHANGE_RSA
  561. bool "Enable RSA-only based ciphersuite modes"
  562. default y
  563. help
  564. Enable to support ciphersuites with prefix TLS-RSA-WITH-
  565. config MBEDTLS_KEY_EXCHANGE_DHE_RSA
  566. bool "Enable DHE-RSA based ciphersuite modes"
  567. default y
  568. depends on MBEDTLS_DHM_C
  569. help
  570. Enable to support ciphersuites with prefix TLS-DHE-RSA-WITH-
  571. config MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE
  572. bool "Support Elliptic Curve based ciphersuites"
  573. depends on MBEDTLS_ECP_C
  574. default y
  575. help
  576. Enable to show Elliptic Curve based ciphersuite mode options.
  577. Disabling all Elliptic Curve ciphersuites saves code size and
  578. can give slightly faster TLS handshakes, provided the server supports
  579. RSA-only ciphersuite modes.
  580. config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA
  581. bool "Enable ECDHE-RSA based ciphersuite modes"
  582. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  583. default y
  584. help
  585. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  586. config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA
  587. bool "Enable ECDHE-ECDSA based ciphersuite modes"
  588. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  589. default y
  590. help
  591. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  592. config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA
  593. bool "Enable ECDH-ECDSA based ciphersuite modes"
  594. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C && MBEDTLS_ECDSA_C
  595. default y
  596. help
  597. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  598. config MBEDTLS_KEY_EXCHANGE_ECDH_RSA
  599. bool "Enable ECDH-RSA based ciphersuite modes"
  600. depends on MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE && MBEDTLS_ECDH_C
  601. default y
  602. help
  603. Enable to support ciphersuites with prefix TLS-ECDHE-RSA-WITH-
  604. config MBEDTLS_KEY_EXCHANGE_ECJPAKE
  605. bool "Enable ECJPAKE based ciphersuite modes"
  606. depends on MBEDTLS_ECJPAKE_C && MBEDTLS_ECP_DP_SECP256R1_ENABLED
  607. default n
  608. help
  609. Enable to support ciphersuites with prefix TLS-ECJPAKE-WITH-
  610. endmenu # TLS key exchange modes
  611. config MBEDTLS_SSL_RENEGOTIATION
  612. bool "Support TLS renegotiation"
  613. depends on MBEDTLS_TLS_ENABLED
  614. default y
  615. help
  616. The two main uses of renegotiation are (1) refresh keys on long-lived
  617. connections and (2) client authentication after the initial handshake.
  618. If you don't need renegotiation, disabling it will save code size and
  619. reduce the possibility of abuse/vulnerability.
  620. config MBEDTLS_SSL_PROTO_TLS1_2
  621. bool "Support TLS 1.2 protocol"
  622. depends on MBEDTLS_TLS_ENABLED
  623. default y
  624. config MBEDTLS_SSL_PROTO_GMTSSL1_1
  625. bool "Support GM/T SSL 1.1 protocol"
  626. depends on MBEDTLS_TLS_ENABLED
  627. default n
  628. help
  629. Provisions for GM/T SSL 1.1 support
  630. config MBEDTLS_SSL_PROTO_DTLS
  631. bool "Support DTLS protocol (all versions)"
  632. default n
  633. depends on MBEDTLS_SSL_PROTO_TLS1_2
  634. help
  635. Requires TLS 1.2 to be enabled for DTLS 1.2
  636. config MBEDTLS_SSL_ALPN
  637. bool "Support ALPN (Application Layer Protocol Negotiation)"
  638. depends on MBEDTLS_TLS_ENABLED
  639. default y
  640. help
  641. Disabling this option will save some code size if it is not needed.
  642. config MBEDTLS_CLIENT_SSL_SESSION_TICKETS
  643. bool "TLS: Client Support for RFC 5077 SSL session tickets"
  644. default y
  645. depends on MBEDTLS_TLS_ENABLED
  646. help
  647. Client support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  648. Disabling this option will save some code size.
  649. config MBEDTLS_SERVER_SSL_SESSION_TICKETS
  650. bool "TLS: Server Support for RFC 5077 SSL session tickets"
  651. default y
  652. depends on MBEDTLS_TLS_ENABLED && (MBEDTLS_GCM_C || MBEDTLS_CCM_C || MBEDTLS_CHACHAPOLY_C)
  653. help
  654. Server support for RFC 5077 session tickets. See mbedTLS documentation for more details.
  655. Disabling this option will save some code size.
  656. menu "Symmetric Ciphers"
  657. config MBEDTLS_AES_C
  658. bool "AES block cipher"
  659. default y
  660. config MBEDTLS_CAMELLIA_C
  661. bool "Camellia block cipher"
  662. default n
  663. config MBEDTLS_DES_C
  664. bool "DES block cipher (legacy, insecure)"
  665. default n
  666. help
  667. Enables the DES block cipher to support 3DES-based TLS ciphersuites.
  668. 3DES is vulnerable to the Sweet32 attack and should only be enabled
  669. if absolutely necessary.
  670. config MBEDTLS_BLOWFISH_C
  671. bool "Blowfish block cipher (read help)"
  672. default n
  673. help
  674. Enables the Blowfish block cipher (not used for TLS sessions.)
  675. The Blowfish cipher is not used for mbedTLS TLS sessions but can be
  676. used for other purposes. Read up on the limitations of Blowfish (including
  677. Sweet32) before enabling.
  678. config MBEDTLS_XTEA_C
  679. bool "XTEA block cipher"
  680. default n
  681. help
  682. Enables the XTEA block cipher.
  683. config MBEDTLS_CCM_C
  684. bool "CCM (Counter with CBC-MAC) block cipher modes"
  685. default y
  686. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  687. help
  688. Enable Counter with CBC-MAC (CCM) modes for AES and/or Camellia ciphers.
  689. Disabling this option saves some code size.
  690. config MBEDTLS_GCM_C
  691. bool "GCM (Galois/Counter) block cipher modes"
  692. default y
  693. depends on MBEDTLS_AES_C || MBEDTLS_CAMELLIA_C
  694. help
  695. Enable Galois/Counter Mode for AES and/or Camellia ciphers.
  696. This option is generally faster than CCM.
  697. config MBEDTLS_NIST_KW_C
  698. bool "NIST key wrapping (KW) and KW padding (KWP)"
  699. default n
  700. depends on MBEDTLS_AES_C
  701. help
  702. Enable NIST key wrapping and key wrapping padding.
  703. endmenu # Symmetric Ciphers
  704. config MBEDTLS_RIPEMD160_C
  705. bool "Enable RIPEMD-160 hash algorithm"
  706. default n
  707. help
  708. Enable the RIPEMD-160 hash algorithm.
  709. menu "Certificates"
  710. config MBEDTLS_PEM_PARSE_C
  711. bool "Read & Parse PEM formatted certificates"
  712. default y
  713. help
  714. Enable decoding/parsing of PEM formatted certificates.
  715. If your certificates are all in the simpler DER format, disabling
  716. this option will save some code size.
  717. config MBEDTLS_PEM_WRITE_C
  718. bool "Write PEM formatted certificates"
  719. default y
  720. help
  721. Enable writing of PEM formatted certificates.
  722. If writing certificate data only in DER format, disabling this
  723. option will save some code size.
  724. config MBEDTLS_X509_CRL_PARSE_C
  725. bool "X.509 CRL parsing"
  726. default y
  727. help
  728. Support for parsing X.509 Certifificate Revocation Lists.
  729. config MBEDTLS_X509_CSR_PARSE_C
  730. bool "X.509 CSR parsing"
  731. default y
  732. help
  733. Support for parsing X.509 Certifificate Signing Requests
  734. endmenu # Certificates
  735. menuconfig MBEDTLS_ECP_C
  736. bool "Elliptic Curve Ciphers"
  737. default y
  738. config MBEDTLS_DHM_C
  739. bool "Diffie-Hellman-Merkle key exchange (DHM)"
  740. default n
  741. help
  742. Enable DHM. Needed to use DHE-xxx TLS ciphersuites.
  743. Note that the security of Diffie-Hellman key exchanges depends on
  744. a suitable prime being used for the exchange. Please see detailed
  745. warning text about this in file `mbedtls/dhm.h` file.
  746. config MBEDTLS_ECDH_C
  747. bool "Elliptic Curve Diffie-Hellman (ECDH)"
  748. depends on MBEDTLS_ECP_C
  749. default y
  750. help
  751. Enable ECDH. Needed to use ECDHE-xxx TLS ciphersuites.
  752. config MBEDTLS_ECDSA_C
  753. bool "Elliptic Curve DSA"
  754. depends on MBEDTLS_ECDH_C
  755. default y
  756. help
  757. Enable ECDSA. Needed to use ECDSA-xxx TLS ciphersuites.
  758. config MBEDTLS_ECJPAKE_C
  759. bool "Elliptic curve J-PAKE"
  760. depends on MBEDTLS_ECP_C
  761. default n
  762. help
  763. Enable ECJPAKE. Needed to use ECJPAKE-xxx TLS ciphersuites.
  764. config MBEDTLS_ECP_DP_SECP192R1_ENABLED
  765. bool "Enable SECP192R1 curve"
  766. depends on MBEDTLS_ECP_C
  767. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  768. help
  769. Enable support for SECP192R1 Elliptic Curve.
  770. config MBEDTLS_ECP_DP_SECP224R1_ENABLED
  771. bool "Enable SECP224R1 curve"
  772. depends on MBEDTLS_ECP_C
  773. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  774. help
  775. Enable support for SECP224R1 Elliptic Curve.
  776. config MBEDTLS_ECP_DP_SECP256R1_ENABLED
  777. bool "Enable SECP256R1 curve"
  778. depends on MBEDTLS_ECP_C
  779. default y
  780. help
  781. Enable support for SECP256R1 Elliptic Curve.
  782. config MBEDTLS_ECP_DP_SECP384R1_ENABLED
  783. bool "Enable SECP384R1 curve"
  784. depends on MBEDTLS_ECP_C
  785. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  786. help
  787. Enable support for SECP384R1 Elliptic Curve.
  788. config MBEDTLS_ECP_DP_SECP521R1_ENABLED
  789. bool "Enable SECP521R1 curve"
  790. depends on MBEDTLS_ECP_C
  791. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  792. help
  793. Enable support for SECP521R1 Elliptic Curve.
  794. config MBEDTLS_ECP_DP_SECP192K1_ENABLED
  795. bool "Enable SECP192K1 curve"
  796. depends on MBEDTLS_ECP_C
  797. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  798. help
  799. Enable support for SECP192K1 Elliptic Curve.
  800. config MBEDTLS_ECP_DP_SECP224K1_ENABLED
  801. bool "Enable SECP224K1 curve"
  802. depends on MBEDTLS_ECP_C
  803. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  804. help
  805. Enable support for SECP224K1 Elliptic Curve.
  806. config MBEDTLS_ECP_DP_SECP256K1_ENABLED
  807. bool "Enable SECP256K1 curve"
  808. depends on MBEDTLS_ECP_C
  809. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  810. help
  811. Enable support for SECP256K1 Elliptic Curve.
  812. config MBEDTLS_ECP_DP_BP256R1_ENABLED
  813. bool "Enable BP256R1 curve"
  814. depends on MBEDTLS_ECP_C
  815. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  816. help
  817. support for DP Elliptic Curve.
  818. config MBEDTLS_ECP_DP_BP384R1_ENABLED
  819. bool "Enable BP384R1 curve"
  820. depends on MBEDTLS_ECP_C
  821. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  822. help
  823. support for DP Elliptic Curve.
  824. config MBEDTLS_ECP_DP_BP512R1_ENABLED
  825. bool "Enable BP512R1 curve"
  826. depends on MBEDTLS_ECP_C
  827. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  828. help
  829. support for DP Elliptic Curve.
  830. config MBEDTLS_ECP_DP_CURVE25519_ENABLED
  831. bool "Enable CURVE25519 curve"
  832. depends on MBEDTLS_ECP_C
  833. default y if !(MBEDTLS_ATCA_HW_ECDSA_SIGN || MBEDTLS_ATCA_HW_ECDSA_VERIFY)
  834. help
  835. Enable support for CURVE25519 Elliptic Curve.
  836. config MBEDTLS_ECP_NIST_OPTIM
  837. bool "NIST 'modulo p' optimisations"
  838. depends on MBEDTLS_ECP_C
  839. default y
  840. help
  841. NIST 'modulo p' optimisations increase Elliptic Curve operation performance.
  842. Disabling this option saves some code size.
  843. config MBEDTLS_ECP_FIXED_POINT_OPTIM
  844. bool "Enable fixed-point multiplication optimisations"
  845. depends on MBEDTLS_ECP_C
  846. default y
  847. help
  848. This configuration option enables optimizations to speedup (about 3 ~ 4 times) the ECP
  849. fixed point multiplication using pre-computed tables in the flash memory.
  850. Disabling this configuration option saves flash footprint (about 29KB if all Elliptic Curve selected)
  851. in the application binary.
  852. # end of Elliptic Curve options
  853. config MBEDTLS_POLY1305_C
  854. bool "Poly1305 MAC algorithm"
  855. default n
  856. help
  857. Enable support for Poly1305 MAC algorithm.
  858. config MBEDTLS_CHACHA20_C
  859. bool "Chacha20 stream cipher"
  860. default n
  861. help
  862. Enable support for Chacha20 stream cipher.
  863. config MBEDTLS_CHACHAPOLY_C
  864. bool "ChaCha20-Poly1305 AEAD algorithm"
  865. default n
  866. depends on MBEDTLS_CHACHA20_C && MBEDTLS_POLY1305_C
  867. help
  868. Enable support for ChaCha20-Poly1305 AEAD algorithm.
  869. config MBEDTLS_HKDF_C
  870. bool "HKDF algorithm (RFC 5869)"
  871. default n
  872. help
  873. Enable support for the Hashed Message Authentication Code
  874. (HMAC)-based key derivation function (HKDF).
  875. config MBEDTLS_THREADING_C
  876. bool "Enable the threading abstraction layer"
  877. default n
  878. help
  879. If you do intend to use contexts between threads, you will need to enable
  880. this layer to prevent race conditions.
  881. config MBEDTLS_THREADING_ALT
  882. bool "Enable threading alternate implementation"
  883. depends on MBEDTLS_THREADING_C
  884. default y
  885. help
  886. Enable threading alt to allow your own alternate threading implementation.
  887. config MBEDTLS_THREADING_PTHREAD
  888. bool "Enable threading pthread implementation"
  889. depends on MBEDTLS_THREADING_C
  890. default n
  891. help
  892. Enable the pthread wrapper layer for the threading layer.
  893. config MBEDTLS_LARGE_KEY_SOFTWARE_MPI
  894. bool "Fallback to software implementation for larger MPI values"
  895. depends on MBEDTLS_HARDWARE_MPI
  896. default y if SOC_RSA_MAX_BIT_LEN <= 3072 # HW max 3072 bits
  897. default n
  898. help
  899. Fallback to software implementation for RSA key lengths
  900. larger than SOC_RSA_MAX_BIT_LEN. If this is not active
  901. then the ESP will be unable to process keys greater
  902. than SOC_RSA_MAX_BIT_LEN.
  903. config MBEDTLS_USE_CRYPTO_ROM_IMPL
  904. bool "Use ROM implementation of the crypto algorithm"
  905. depends on ESP_ROM_HAS_MBEDTLS_CRYPTO_LIB && IDF_EXPERIMENTAL_FEATURES
  906. default "n"
  907. select MBEDTLS_SHA512_C
  908. select MBEDTLS_AES_C
  909. select MBEDTLS_CCM_C
  910. select MBEDTLS_ROM_MD5
  911. select MBEDTLS_HARDWARE_SHA
  912. help
  913. Enable this flag to use mbedtls crypto algorithm from ROM instead of ESP-IDF.
  914. This configuration option saves flash footprint in the application binary.
  915. Note that the version of mbedtls crypto algorithm library in ROM is v2.16.12.
  916. We have done the security analysis of the mbedtls revision in ROM (v2.16.12)
  917. and ensured that affected symbols have been patched (removed). If in the future
  918. mbedtls revisions there are security issues that also affects the version in
  919. ROM (v2.16.12) then we shall patch the relevant symbols. This would increase
  920. the flash footprint and hence care must be taken to keep some reserved space
  921. for the application binary in flash layout.
  922. endmenu # mbedTLS