Commit Graph

1002 Commits

Author SHA1 Message Date
Jiang Jiang Jian
b6a2af2fe1 Merge branch 'fix/mbedtls-threading-impl-kconfig' into 'master'
fix(mbedtls): make threading implementation exclusive

See merge request espressif/esp-idf!48846
2026-05-25 18:08:30 +08:00
Jiang Guang Ming
cdfbee61a9 fix(mbedtls): make threading implementation exclusive
Ensure the pthread and alternate threading implementations cannot be enabled at the same time.
2026-05-25 11:13:51 +08:00
Jiang Guang Ming
1ac137860c feat(mbedtls): enable PSA threading alt with ROM mbedTLS 2026-05-20 14:15:23 +08: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
Aditya Patwardhan
138ebe2d85 fix(mbedtls): use constant-time compare and zeroize key material
Replace memcmp with mbedtls_ct_memcmp in PSA MAC verify_finish entries
(CMAC, HMAC-transparent, HMAC-opaque) to prevent timing side-channel
MAC forgery, and unconditionally zeroize the locally-computed MAC on
the stack before return so a later stack-disclosure primitive cannot
recover the valid MAC.

Replace bzero with mbedtls_platform_zeroize in AES context free paths.
2026-05-19 12:15:28 +05:30
harshal.patil
83ebd475c3 test(mbedtls/persistent_storage_format): Add ESP ITS NVS format-stability test app 2026-05-15 09:12:20 +05:30
harshal.patil
4821f331fe refactor(mbedtls/test): Move the mbedtls test app to support multiple test apps 2026-05-15 09:09:15 +05:30
harshal.patil
d7c9c3bc10 feat(mbedtls/psa_esp_rsa_ds): Support persistent ESP-RSA DS driver 2026-05-15 09:09:15 +05:30
Mahavir Jain
cc532288e8 Merge branch 'fix/bring_back_ecjpake_config' into 'master'
fix(mbedtls): bring back deprecated config MBEDTLS_ECJPAKE_C

See merge request espressif/esp-idf!48462
2026-05-14 11:11:24 +05:30
Alexey Gerenkov
edb75262a1 Merge branch 'feature/update-esp-clang-to-esp-21.1.3_20260304' into 'master'
feat(tools): update esp-clang version to esp-21.1.3_20260408

Closes IDF-14965, LLVM-501, and LLVM-531

See merge request espressif/esp-idf!46361
2026-05-13 22:54:10 +08:00
Laukik Hase
a8c30b7d6f Merge branch 'feat/tee_post_srv_stack_cleanup' into 'master'
feat(esp_tee): Clear out all sensitive buffers explicitly after TEE cryptographic operations

Closes IDF-15671

See merge request espressif/esp-idf!48004
2026-05-13 11:57:26 +05:30
Ashish Sharma
881dc4193a fix(mbedtls): bring back deprecated config MBEDTLS_ECJPAKE_C 2026-05-13 14:25:28 +08:00
Ashish Sharma
a2ba1bc18c fix(mbedtls): keep psa crypto storage enabled with ITS backend
Closes https://github.com/espressif/esp-idf/issues/18555
2026-05-12 17:00:14 +08:00
Laukik Hase
281d219fac feat(esp_tee): Clear out all sensitive buffers explicitly after TEE crypto operations 2026-05-12 13:56:28 +05:30
Mahavir Jain
0419f8b991 Merge branch 'fix/memory_leak_cross_signed_cert_verify' into 'master'
fix(esp_crt_bundle): fixes verification failures with cross signed certificates

Closes IDFGH-17582 and IDFGH-17627

See merge request espressif/esp-idf!47966
2026-05-12 11:03:52 +05:30
Ashish Sharma
0e03327f69 fix(esp_crt_bundle): fixes verification with cross signed cert 2026-05-11 17:44:16 +08:00
Ashish Sharma
737e97340b fix(esp_crt_bundle): fixes a potential memory leak with cross signed certificates
Closes https://github.com/espressif/esp-idf/issues/18512
Closes https://github.com/espressif/esp-idf/issues/18550
2026-05-11 17:41:45 +08:00
Chen Jichang
3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
Alexey Gerenkov
f16bb34ff7 fix(build): fix Clang 21 build warnings/errors 2026-05-07 17:42:38 +03:00
Ashish Sharma
cd38d68bd1 feat(bootloader_support): remove P192 curve support 2026-04-30 18:04:00 +08:00
Ashish Sharma
bd27c398e8 fix(esp_tee): optimise build size by removing unused configs 2026-04-30 18:02:07 +08:00
Ashish Sharma
3b3372df18 fix(mbedtls): remove deprecated configs and migrate to PSA 2026-04-30 18:02:06 +08:00
Ashish Sharma
7a1ba8f4ca feat(mbedtls): update to version 4.1.1 2026-04-30 18:02:06 +08:00
Harshal Patil
a860d18878 Merge branch 'change/add_tee_key_len_validation_psa_ecdsa_driver' into 'master'
Add tee key id length validation in the ESP-ECDSA PSA driver

See merge request espressif/esp-idf!48054
2026-04-29 23:57:22 +05:30
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
harshal.patil
63992372fb change(mbedtls): Add tee key id length validation in the ESP-ECDSA PSA driver 2026-04-28 22:17:25 +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
harshal.patil
7eb44576be test(mbedtls): Add a test for opaque HMAC driver verification 2026-04-22 10:11:27 +05:30
harshal.patil
f195d183be fix(mbedtls): Flash compatibility across multiple key sources (ECDSA, HMAC) 2026-04-22 10:11:12 +05:30
Mahavir Jain
a572df21d3 Merge branch 'fix/remove_mbedtls_tls_disabled_config' into 'master'
fix(mbedtls): remove not required MBEDTLS_TLS_DISABLED config

See merge request espressif/esp-idf!47818
2026-04-22 08:51:14 +05:30
Ashish Sharma
5fc46ba652 fix(https_server): fixes failing example build for linux target 2026-04-21 19:54:46 +08:00
Ashish Sharma
bcf0acdead fix(mbedtls): remove not required MBEDTLS_TLS_DISABLED config
Closes https://github.com/espressif/esp-idf/issues/18458
2026-04-21 17:48:48 +08:00
Aditya Patwardhan
e1d01809dc fix(mbedtls): correct inverted NULL check in esp_hmac_abort_opaque
esp_hmac_abort_opaque() had an inverted guard that called
mbedtls_platform_zeroize() on the context only when the context pointer
was NULL, dereferencing NULL and skipping cleanup of valid contexts.

Effect:
* Calling the abort path with a NULL pointer crashes (NULL write)
  instead of being a safe no-op.
* The valid (non-NULL) HMAC opaque operation context is never zeroized
  on abort, leaving sensitive intermediate HMAC state and key handle
  references in operation memory until the buffer is overwritten or
  freed.

Fix: invert the check so zeroization runs only when the context pointer
is non-NULL.
2026-04-21 11:27:15 +05:30
Espressif BOT
54d4d0b140 change(mbedtls/crt_bundle): Update esp_crt_bundle certificates 2026-04-13 16:04:54 +05:30
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
a858f1683d fix(mbedtls): reenable RSA 4096 bit key performance test 2026-04-08 14:54:04 +08:00
Ashish Sharma
a2f4554f10 fix(protocomm): fixes potential issues that can lead to crash during device provisioning 2026-04-01 10:08:00 +08:00
Mahavir Jain
f6b7c2f9fe Merge branch 'fix/ds_ctx_efuse_key_id_type' into 'master'
Preserve flash compatibility by reverting the modified `esp_ds_data_ctx_t` size

See merge request espressif/esp-idf!47009
2026-03-26 10:12:02 +05:30
harshal.patil
2b77826e06 fix(mbedtls/rsa_ds): Preserve compatibility by reverting the modified esp_ds_data_ctx_t size 2026-03-25 18:54:04 +05:30
harshal.patil
28736a81fa fix(esp_security): Enable Key Manager clocks even for efuse key operations
The Key Manager holds a key usage register, thus, the Key Manager peripheral
clock must be enabled even for efuses-based key operations to route the
crypto operations to correctly to the efuses (default is Key Manager)
2026-03-25 10:38:44 +05:30
nilesh.kale
31c88b7a4d fix(mbedtls): disable cert bundle tests in FPGA env 2026-03-23 13:53:54 +08:00
Aditya Patwardhan
1e75562404 Merge branch 'fix/fix_psa_sha_driver_macro_checks' into 'master'
fix(mbedtls): Gate PSA SHA driver on ACCEL flags instead of raw SOC caps

Closes IDFGH-17384

See merge request espressif/esp-idf!46685
2026-03-18 13:53:17 +05:30
Ashish Sharma
eb3922dd12 fix(mbedtls): fixes incorrect macro checks in PSA SHA driver
Closes https://github.com/espressif/esp-idf/issues/18354
2026-03-17 13:18:28 +08:00
Ashish Sharma
d8b02883dc fix(secure_boot): marks 192 bit support curve legacy 2026-03-17 10:25:44 +08:00
harshal.patil
b5550281b9 change(mbedtls): Change the ESP-DS-RSA key lifetime name to include the VOLATILE keyword 2026-03-06 15:00:38 +05:30
Mahavir Jain
a5d7fb3a41 Merge branch 'fix/fix_dynamic_buffer_with_tls1_3' into 'master'
fix: fixes failing dynamic buffer tests

Closes IDFCI-5130

See merge request espressif/esp-idf!45150
2026-03-05 18:35:32 +05:30
harshal.patil
a1bbab43fe feat(mbedtls/esp_rsa_ds): Support Key Manager key using the ESP-RSA-DS PSA interface 2026-03-03 18:42:07 +05:30
harshal.patil
8036017951 feat(mbedtls/esp_mac): Support Key Manager key using the ESP-HMAC PSA interface 2026-03-03 18:40:31 +05:30