Commit Graph
154 Commits
Author SHA1 Message Date
Ashish Sharma f7b8db2f2f feat(espcoredump): migrate to esp sha256 implementation from mbedtls sha256 2026-07-06 11:11:12 +05:30
Ashish Sharma 7d9f061cc1 fix(mbedtls): fixes TLS1.3 server failing with dynamic buffer 2026-07-06 10:38:10 +05:30
Aditya Patwardhan 08b567ef3b fix(esp-tls): address MR review comments for SE PSA driver
- esp_tls_mbedtls: require cert when PSA-backed server/client key is set
- esp_tls_mbedtls: drop redundant pk_init/x509_crt_init (calloc handles it)
- psa SE driver: copy callbacks/opaque_key by value (no lifetime coupling)
- psa SE driver: replace atomic CAS with simple null check on register
- psa SE driver: use sig_len from sign callback with bounds validation
- psa SE driver: validate pubkey_len returned by export_pubkey callback
- psa SE driver: check hash sub-alg in RSA PKCS1V15 branch of validate_request
- psa SE driver: align secure_element_register_callbacks doc with value-copy impl
- esp_https_server: initialize server_key in HTTPD_SSL_CONFIG_DEFAULT
- mbedtls: move SECURE_ELEMENT_DRIVER_ENABLED to esp_config.h for parity
  with ESP_ECDSA_DRIVER_ENABLED; drop target_compile_definitions
- docs: fix esp_tls_cfg_t -> esp_http_client_config_t cross-reference
- docs: check psa_import_key() status in ESP-TLS PSA example
- hints/error_output: point at CONFIG_MBEDTLS_SECURE_ELEMENT_DRIVER_ENABLED
2026-06-29 19:20:22 +05:30
Aditya Patwardhan 1c20f525b4 feat(mbedtls): Add PSA Crypto driver for external secure elements
Add generic secure element PSA driver with runtime callback registration.
Consolidate Kconfig into single MBEDTLS_SECURE_ELEMENT_DRIVER_ENABLED option.

Closes https://github.com/espressif/esp-idf/issues/18388
2026-06-29 19:20:07 +05:30
harshal.patil 3494df8c85 feat(mbedtls): Support custom storage backend for persistent PSA keys 2026-06-18 09:37:15 +05:30
Sudeep Mohanty 7c5fe924a5 fix(mbedtls): initialize SRCS variables in mbedtls/CMakeLists.txt BOOTLOADER_BUILD branch 2026-06-05 16:12:01 +02:00
Jiang Guang Ming 42674c2f95 fix(mbedtls): support ROM mbedTLS crypto in bootloader 2026-05-20 14:15:22 +08:00
Jiang Guang Ming d5a712f1f8 feat(mbedtls): enable ROM mbedTLS pytest with esp32c2 rev2.0 2026-05-20 14:15:19 +08:00
Jiang Guang Ming 5d5b8200dc feat(mbedtls): enable ESP32-C2(Rev2.0) ROM crypto for PSA 2026-05-20 14:10:14 +08:00
Alexey Gerenkov f16bb34ff7 fix(build): fix Clang 21 build warnings/errors 2026-05-07 17:42:38 +03:00
Ashish Sharma 7a1ba8f4ca feat(mbedtls): update to version 4.1.1 2026-04-30 18:02:06 +08:00
Mahavir Jain 6112320eae Merge branch 'fix/fix_https_server_linux_build' into 'master'
fix(https_server): fixes failing example build for linux target

See merge request espressif/esp-idf!47824
2026-04-29 12:57:17 +05:30
Guillaume Souchere 44fafd42df fix(mbedtls): compile esp_mem.c in IDF component lib instead of builtin target
esp_mem.c in the builtin target via
target_sources(builtin PRIVATE ...) called from the parent CMakeLists.
This cross-directory source injection causes CMake's Ninja generator on
Windows to produce unstable TARGET_PDB/RSP_FILE paths across
reconfigures, changing the ninja command hash and forcing a re-archive
of libmbed-builtin.a on every cmake run — even when no source changed.
This broke test_rebuild_source_files.

Fix by adding esp_mem.c to the IDF mbedtls component library
(mbedtls_srcs) instead. The final ELF link uses --start-group, so
builtin's platform.o resolves esp_mbedtls_mem_calloc/free from the
component library regardless of archive order. esp_mem.c is IDF-specific
code (heap_caps_calloc, sdkconfig.h) and belongs in the port layer, not
in any submodule target.
2026-04-28 08:51:44 +02:00
Ashish Sharma 5fc46ba652 fix(https_server): fixes failing example build for linux target 2026-04-21 19:54:46 +08:00
Guillaume Souchere e7cf8cd3cb fix(mbedtls): fix undefined esp_mbedtls_mem_calloc/free at link time
platform.c (compiled into the 'builtin' archive) calls
esp_mbedtls_mem_calloc and esp_mbedtls_mem_free directly by name via
the MBEDTLS_PLATFORM_STD_CALLOC/FREE macros in esp_config.h.
Previously, esp_mem.c was compiled into the 'tfpsacrypto' archive, which
appears after 'builtin' in the link command, causing the linker to fail
with undefined reference errors when 'builtin' was processed first.

Moving esp_mem.c into 'builtin' to assure that the function used by
esp_mbedtls_mem_calloc and esp_mbedtls_mem_free are available when
pltform.c is linked.
2026-04-09 10:51:21 +02:00
Ashish Sharma 6f5b078ed6 feat: adds DS Sign capabilities for ESP32S2 2026-02-05 10:12:25 +08:00
Ashish Sharma e06a7dd791 feat: adds new Kconfig variable for DS peripheral 2026-02-05 10:12:25 +08:00
Ashish Sharma 1d185a6548 feat: adds PSA DS driver support 2026-02-05 10:12:25 +08:00
Ashish Sharma 470964ffdd fix: make the PSA compile definitions public 2026-02-03 14:55:44 +08:00
Ashish Sharma 523194465b change(mbedtls): rename builtin to mbed-builtin 2026-02-03 14:55:44 +08:00
harshal.patil 4ab9ac1ccd fix(mbedtls): Make the driver define macros public to allow application access
- Also, use the PSA HMAC opaque key interface for HMAC-PBKDF2
2026-01-31 13:30:55 +05:30
harshal.patil ae459b5204 feat(mbedtls): Introduce ESP-HMAC PSA opaque driver 2026-01-31 00:45:11 +05:30
harshal.patil 53072bfa9d fix(mbedtls): Enable h/w accel for CMAC and HMAC operations
- Refactor ESP-MAC drivers
2026-01-31 00:45:11 +05:30
morris 35bdd8c651 feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma 2026-01-22 14:14:14 +08:00
harshal.patil e9ea55bea2 feat(mbedtls/ecdsa): Introduce PSA ECDSA driver 2026-01-19 09:14:37 +05:30
Laukik Hase 89f555d698 feat(esp_tee): Migrate TEE attestation to the PSA interface 2026-01-16 12:28:57 +05:30
Mahavir Jain 5b4d3c1cc5 Merge branch 'contrib/github_pr_18121' into 'master'
Set CMake CACHE variables for mbedtls correctly (GitHub PR)

Closes IDFGH-17095

See merge request espressif/esp-idf!45090
2026-01-14 15:42:26 +05:30
Ferdinand Bachmann 56c3be2604 fix(cmake): Set CACHE variables correctly
The syntax for setting cache variables is actually
set(<variable> <value> CACHE <type> <docstring>) and not
set(<variable> CACHE <type> <value>).

The previous code silently set the variables to the empty string.
2026-01-13 15:52:35 +01:00
Ashish Sharma 3d5775e22b feat: adds PSA MD5 driver support 2026-01-07 10:41:33 +08:00
Mahavir Jain ad2a692c0b Merge branch 'fix/coap_dtls_build' into 'master'
fix(mbedtls): DTLS build issue due to missing timing APIs

See merge request espressif/esp-idf!44790
2026-01-06 10:22:02 +05:30
Mahavir Jain cf6dff90de fix(mbedtls): DTLS build issue due to missing timing APIs 2026-01-05 12:32:58 +05:30
harshal.patil e91d50ed1e fix(mbedtls): Support partial hardware AES-GCM and s/w fallback for non-AES ciphers
- Support software-fallback for unsupported hardware AES lengths
2026-01-03 12:17:50 +05:30
Mahavir Jain a6375c0db4 fix(mbedtls): misc updates post PSA crypto migration 2025-12-30 09:31:49 +05:30
Ashish Sharma 7310184949 feat: migrates mbedtls to PSA APIs 2025-12-30 09:31:49 +05:30
Ashish Sharma 69ea28c886 feat: add Kconfig option for mbedTLS 4.x 2025-12-01 14:05:05 +08:00
harshal.patil a6de2c79ed fix(mbedtls/port): Align AES and SHA DMA buffers to 16 when SPIRAM encryption is enabled
- Targets that support GDMA and MSPI encryption module need data and addresses aligned to 16
2025-11-06 12:28:19 +05:30
Roland Dobai a0b589c147 Merge branch 'feat/cmakev2' into 'master'
feat(cmakev2): introduce cmake-based build system v2

See merge request espressif/esp-idf!42691
2025-11-04 02:53:36 +01:00
Frantisek Hrbata 070590986a fix(mbedtls/cmake): handle lwip dependency in cmakev2
Currently, the lwip is linked to mbedtls if CONFIG_LWIP_ENABLE is set.
This approach works in cmakev1 because only the configuration for
BUILD_COMPONENTS is available during component evaluation. However, this
is not the case in cmakev2, where the configuration for all components
is available. This means that even if CONFIG_LWIP_ENABLE is set, it does
not guarantee that the lwip component is included in the build. For
cmakev2, modify the check to use a generator expression to ensure that
lwip is linked to mbedtls only if lwip is actually included in the
build.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-10-30 17:17:49 +08:00
Ashish Sharma acf89924c8 feat(esp_http): migrate esp_http to PSA API 2025-10-26 10:13:14 +08:00
harshal.patil 8992f08bef feat(mbedtls/aes): Add config to support AES block and DMA modes during runtime
- Dynamically switch the AES operation modes based on the buffer operating length
- Shorter AES and SHA operations can now run faster and concurrently as well

Closes https://github.com/espressif/esp-idf/issues/15914
2025-09-20 10:55:07 +05:30
Laukik Hase c152663408 feat(esp_tee): Added support for PBKDF2-based (HMAC) ECDSA signing 2025-09-19 12:06:02 +05:30
harshal.patil 55e0730a8d change(esp_hw_support): Move security-related modules to the esp_security component
- Also adds support to whitelist target specific expected dependency violations
in check_dependencies.py
2025-08-04 11:43:01 +05:30
Mahavir Jain 8096a2a295 Merge branch 'feat/mbedtls_no_buffer_alloc_on_session_reset' into 'master'
feat(mbedtls): disable unnecessary buffer allocation in dynamic buffer session reset

See merge request espressif/esp-idf!40126
2025-07-31 17:53:50 +05:30
Ashish Sharma d9c431268a feat(mbedtls): restructure mbedtls configuration page 2025-07-30 17:47:54 +08:00
Ashish Sharma 6259505f18 feat(mbedtls): disable unnecessary buffer allocation in dynamic buffer session reset 2025-07-30 17:45:16 +08:00
Ashish Sharma 466a365a02 feat(mbedtls): adds support for RSA decryption with DS peripheral 2025-07-07 13:32:06 +08:00
Mahavir Jain 7c792377e9 fix(mbedtls): remove Wunterminated-string-initialization
- Fixed in upstream release 3.6.4
- Addressed few typos in Kconfig
2025-07-04 09:59:20 +05:30
Ashish Sharma cabb5009f2 feat(esp_crt): adds support for cross signed root certificates 2025-06-26 16:01:11 +08:00
Alexey Lapshin 74e26f8d29 fix(mbedtls): suppress -Wunterminated-string-initialization 2025-06-25 18:00:39 +07:00
Ashish Sharma 415e0f3c86 feat(mbedtls): add support for dynamic buffer for TLS1.3
Closes https://github.com/espressif/esp-idf/issues/15448
2025-04-24 12:05:36 +08:00