mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 22:51:14 +00:00
fix(soc): Fixed ECDSA register compatibility
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -109,11 +109,15 @@ void ecdsa_hal_gen_signature(ecdsa_hal_config_t *conf, const uint8_t *hash,
|
||||
configure_ecdsa_periph(conf);
|
||||
|
||||
#if CONFIG_HAL_ECDSA_GEN_SIG_CM
|
||||
#if CONFIG_IDF_TARGET_ESP32H2
|
||||
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102)) {
|
||||
ecdsa_hal_gen_signature_with_countermeasure(hash, r_out, s_out, len);
|
||||
} else {
|
||||
ecdsa_hal_gen_signature_inner(hash, r_out, s_out, len);
|
||||
}
|
||||
#else
|
||||
ecdsa_hal_gen_signature_with_countermeasure(hash, r_out, s_out, len);
|
||||
#endif
|
||||
#else /* CONFIG_HAL_ECDSA_GEN_SIG_CM */
|
||||
ecdsa_hal_gen_signature_inner(hash, r_out, s_out, len);
|
||||
#endif /* !CONFIG_HAL_ECDSA_GEN_SIG_CM */
|
||||
|
Reference in New Issue
Block a user