Commit Graph
1019 Commits
Author SHA1 Message Date
Mahavir Jain bf51d194fe Merge branch 'update/update_cmn_crt_authorities_csv' into 'master'
Update common cert authorities csv

See merge request espressif/esp-idf!49372
2026-06-18 09:30:11 +05:30
Alexey Lapshin e389f3e4df Merge branch 'feature/upgrade_toolchain_to_16.1.0_20260609' into 'master'
Upgrade GNU toolchain to 16.1.0_20260609

See merge request espressif/esp-idf!49523
2026-06-18 00:55:07 +04:00
Alexey Lapshin 4328dc28e2 fix(mbedtls): increase test limits 2026-06-17 17:24:24 +07:00
Ashish Sharma e6f5f5ff63 fix(mbedtls/port): add additional hardening for PSA drivers 2026-06-15 16:10:09 +05:30
harshal.patil 9172417c13 fix(mbedtls/port): align ESP PSA hardware drivers with software references
Audited every esp_* PSA driver against its corresponding software driver in
mbedtls/library (psa_crypto_cipher.c, psa_crypto_aead.c, psa_crypto_mac.c,
psa_crypto_hash.c, psa_crypto_ecp.c, psa_crypto_rsa.c) and fixed gaps in
workflow ownership, error-path cleanup, sensitive-data wiping, and BAD_STATE
gating per the PSA Crypto API spec.

esp_aes (cipher): fix padding oracle in cipher_finish by replacing leaky
branches with mbedtls_ct_* primitives; abort wipes the driver-level ctx,
not just the inner mbedtls_aes_context; setup routes errors through abort.

esp_aes_gcm (AEAD): zeroize the 16-byte full_tag scratch; restore the
*output_length = finish_output_size assignment that the SW reference keeps
for future ciphers; NULL the inner ctx pointer after free in abort; gate
update/finish on a live ctx with PSA_ERROR_BAD_STATE.

esp_ecdsa: keep abort-at-exit in the one-shot wrappers so the stack-copy
of the hash (needed for little-endian byte order on HW) is wiped per
PSA spec 6.3.3, drop the over-defensive public-key qx/qy wipes that the
SW driver does not perform.

esp_cmac / esp_hmac_transparent / esp_hmac_opaque (MAC): make abort
idempotent, route setup errors through abort, gate update/finish/
verify_finish on PSA_ERROR_BAD_STATE, wipe M_last and intermediate hmac[]
buffers on completion or HW failure. HMAC opaque gains alg + computed
fields to mirror the SW psa_crypto_mac.c state machine. HMAC transparent
explicitly aborts the inner SHA context before reusing it for the outer
hash.

esp_sha: switch the per-op live indicator to (sha_ctx != NULL) so the
public esp_sha_operation_type_t enum keeps its original ordinal values;
free + NULL sha_ctx on every error path; gate update/finish/clone on a
live ctx; wipe per-algorithm core/parallel-engine scratch buffers
(W[], A[], state) on HW-engine failure.

esp_md5: replace bare memset in abort with mbedtls_platform_zeroize.

esp_rsa_ds: complete() no longer frees sig_buffer (abort owns that);
start() routes failures through abort; asymmetric_decrypt funnels all
cleanup through a single exit: label. RSA-DS utilities wipe the
decrypted-plaintext scratch on v15 / OAEP unpad failure.
2026-06-15 16:10:09 +05:30
Espressif BOT cdff63e838 change(mbedtls/crt_bundle): Update esp_cmn_crt_bundle certificates 2026-06-10 10:10:43 +05:30
Aditya Patwardhan 5f8e7058a5 Merge branch 'fix/rsa_ds_driver_constant_time' into 'master'
Fix/rsa ds driver constant time

See merge request espressif/esp-idf!48678
2026-06-09 22:25:23 +05:30
Mahavir Jain 05c70c1fd4 Merge branch 'fix/ecdsa_ecc_hw_input_validation' into 'master'
Validate ECDSA signature range and harden ECC memory power-down

See merge request espressif/esp-idf!48958
2026-06-09 14:40:24 +05:30
harshal.patil 554cce6937 fix(mbedtls): validate ECDSA signature range and harden ECC memory power-down 2026-06-09 10:59:11 +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
Ashish Sharma 4c1422a02a fix(rsa_ds): make RSA-OAEP unpadding constant-time 2026-06-05 13:39:27 +08:00
Ashish Sharma 96f43bb049 fix(rsa_ds): make PKCS#1 v1.5 unpadding constant-time 2026-06-05 13:39:27 +08:00
harshal.patil 3cbd175d2b test(mbedtls/crt_bundle): Make weak-hash test self-contained
The "custom certificate bundle - weak hash" test relied on DigiCert
Global Root CA being present as a trust anchor in cacrt_all.pem (the
only SHA-1-self-signed root in the chain it loaded). The recent
cacrt_all.pem refresh moved that root to cacrt_deprecated.pem, so the
chain could no longer anchor and the test started failing.
2026-06-02 10:06:43 +05:30
Espressif BOT 7126a31b02 change(mbedtls/crt_bundle): Update esp_crt_bundle certificates 2026-06-02 10:06:43 +05:30
Aditya Patwardhan bf1c92341d Merge branch 'fix/fix_psa_ecdsa_driver_missing_checks' into 'master'
fix(mbedtls): fixes missing check before ecdsa verify

See merge request espressif/esp-idf!48818
2026-05-26 17:50:33 +05:30
harshal.patil a24bd0bf10 test(mbedtls): Add out-of-bounds test for the ECDSA hardware driver 2026-05-26 11:01:57 +05:30
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
Ashish Sharma d7cf1896b5 fix(mbedtls): fixes missing check before ecdsa verify 2026-05-25 11:51:53 +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