Commit Graph
28 Commits
Author SHA1 Message Date
Mahavir Jain cce28a3aa4 Merge branch 'fix/esp32s2_aes_dma_psram_partial_block_hang_v6.0' into 'release/v6.0'
Avoid ESP32-S2 Crypto DMA stall on PSRAM output with partial blocks (v6.0)

See merge request espressif/esp-idf!51875
2026-09-03 13:42:56 +05:30
Mahavir Jain 78f0f418c8 Merge branch 'fix/disable-key-mgr_v6.0' into 'release/v6.0'
Disable Key Manager support (v6.0)

See merge request espressif/esp-idf!51391
2026-09-03 13:42:49 +05:30
harshal.patil 4025a2f8b9 fix(mbedtls/aes): fix ESP32-S2 Crypto DMA stall on PSRAM output with partial blocks
The ESP32-S2 Crypto DMA in-channel stalls silently when a receive
descriptor list transitions from external to internal RAM. The AES
driver hits this when a PSRAM-output operation has a trailing partial
block, as the internal stream descriptor is linked after the external
RAM data descriptors.

- esp_aes_process_dma(): process the block-aligned part and the partial
  block as two separate DMA operations, keeping each descriptor list
  uniform
- crypto_dma_ll_reset(): also reset the in-channel (per the TRM receive
  reset sequence), otherwise stale state from a preceding external-RAM
  operation corrupts the next operation's output

The GCM DMA path is unaffected; it never operates on PSRAM buffers.
2026-08-25 14:50:15 +05:30
harshal.patil 516e849636 change(security): disable Key Manager support on ESP32-C5/P4/S31
The Key Manager hardware peripheral in its current form needs further
design changes before it can be offered as a production feature.
Until a revised peripheral design is available, withdraw ESP-IDF
support for it on all Key Manager capable targets.
2026-08-11 09:41:38 +05:30
Alexey Lapshin fbaf869fb9 feat(build): add RISC-V ZCMP post-link workaround check
Validate linked RISC-V executables when
CONFIG_COMPILER_ENABLE_RISCV_ZCMP is enabled on affected chips.
Disassemble each function and reject mstatus.MIE clears that lack an
earlier mintthresh write of 0xff.

Handle csrrci, csrrw, and register-mask csrrc patterns while ignoring
csrrs. Add build-only coverage for valid and invalid sequences with
CMake v1 and v2.

Stop the hardware stack guard before switching stacks during restart,
and keep ZCMP disabled for TEE test apps that still require the
workaround.
2026-07-30 12:14:54 +07:00
Ashish Sharma 7bcafe2171 fix(esp_hal_security): clamp tag_len in aes_hal_gcm_read_tag to prevent OOB 2026-07-16 18:24:47 +08:00
harshal.patil a9b74b5219 fix(soc): Remove non-existent crypto registers (ESP32-C61) 2026-06-29 12:27:50 +05:30
harshal.patil 5f824c8683 fix(secure_boot): range-check ECDSA r,s in bootloader before ROM verify 2026-06-12 17:32:38 +05:30
harshal.patil b420f20040 test(esp_hal_security): warm up ECC const-time loop before measuring 2026-06-09 15:07:55 +05:30
harshal.patil 3195c942da fix(mbedtls): validate ECDSA signature range and harden ECC memory power-down 2026-06-09 15:02:59 +05:30
muhaidong fc20d3f1e5 fix(esp_security): fix ECDH1 key manager multi-stage helper 2026-05-11 12:04:44 +05:30
harshal.patil 98bbe26aea feat(esp_security): add ECDH1 deployment mode to Key Manager driver 2026-05-11 09:38:00 +05:30
harshal.patil ba5fdc77fd fix(esp_security): guard key manager APIs against unsupported chip revs
On ESP32-P4 rev < 3.0, Key Manager is software-disabled, but the public
esp_key_mgr.h APIs had no runtime check.
Calls using HMAC/DS/PSRAM key types fell through to
HAL_ASSERT("Unsupported ...") paths in key_mgr_ll.h. Gate
each public API with key_mgr_ll_is_supported() and return
ESP_ERR_NOT_SUPPORTED cleanly instead.
2026-05-04 18:18:20 +05:30
harshal.patil 1caafa9e2b fix(esp_security): Enable ECC clock while using the Key Manager's ECDH key deployment mode 2026-05-04 15:42:30 +05:30
harshal.patil 1db26df63d fix(esp_security): Fixes incorrect key manager configuration for ESP32-P4 rev < 3 2026-03-24 16:33:25 +05:30
Ashish Sharma 0cac091538 fix(esp_hal_security): fixes failing hmac_hal_configure with efuse_key for p4 rev < 3
Closes https://github.com/espressif/esp-idf/issues/18370
2026-03-24 16:33:25 +05:30
harshal.patil 45d5ef45a5 feat(esp_ds): Support using the AES key used by DS peripheral for encrypting params 2026-03-23 10:46:22 +05:30
igor.udot e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Fu Hanxi beaaa115f3 Merge branch 'ci/missing_config_pre_commit_hook_v6.0' into 'release/v6.0'
ci: add pre-commit hook to detect missing configs (v6.0)

See merge request espressif/esp-idf!46205
2026-03-20 01:10:09 +01:00
harshal.patil 629a4e2444 docs(key-manager): Add Key-Manager peripheral related documentation 2026-03-18 16:42:21 +05:30
Evgeny Torbin 0070b687b5 ci: remove unused test cases 2026-03-12 12:34:23 +01:00
Ashish Sharma b1f14d19d0 feat: adds new Kconfig variable for DS peripheral 2026-02-06 16:09:41 +08:00
Ashish Sharma 93349d05b2 feat: adds PSA DS driver support 2026-02-06 16:09:41 +08:00
Aditya Patwardhan db2f4d1660 fix(esp_hal_security): Fix pre-commit hook changes 2026-01-30 17:12:56 +05:30
Aditya Patwardhan 69179d566e fix(hal/huk): Add missing break statements in switch cases for ESP32-C5 2026-01-30 17:12:55 +05:30
Aditya Patwardhan 8c7b5de2f3 fix(docs): Fix docs after esp_hal_security update 2026-01-30 17:12:54 +05:30
Aditya Patwardhan 4d3cfefc2e refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-30 17:12:54 +05:30
Aditya Patwardhan 6c2716cd27 refactor(hal): Created esp_hal_security for security code 2026-01-30 17:12:49 +05:30