fix(esp_security): cover the crypto reset coupling in the driver locks

A peripheral's reset also resets the ones it occupies, so a lock has to cover
both. Gate the ECDSA MPI lock on SOC_ECDSA_USES_MPI rather than the runtime
ecdsa_ll_is_mpi_required() and set that capability on C5, lock the Key Manager
path in esp_key_mgr.c, clean HMAC after its reset, and enable DS before the
primitives its reset covers.
This commit is contained in:
harshal.patil
2026-09-08 14:03:50 +05:30
committed by Harshal Patil
parent 6f6e2aa93c
commit de3a510a18
10 changed files with 100 additions and 52 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -445,6 +445,14 @@ __attribute__((always_inline)) static inline void ecdsa_ll_set_ecdsa_key_blk(ecd
}
}
/**
* @brief Check if the ECDSA peripheral uses MPI module's memory
*/
static inline bool ecdsa_ll_is_mpi_required(void)
{
return false;
}
/**
* @brief Check if the ECDSA peripheral is supported on this chip revision
* For ESP32-C5, ECDSA is always supported