feat(esp_ds): Support using the AES key used by DS peripheral for encrypting params

This commit is contained in:
harshal.patil
2026-03-20 11:15:23 +05:30
committed by Mahavir Jain
parent 4495f9028c
commit 0db717b9ec
10 changed files with 159 additions and 34 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -287,6 +287,18 @@ esp_err_t __wrap_esp_ds_encrypt_params(esp_ds_data_t *data,
esp_crypto_sha_aes_lock_release();
return err;
}
esp_err_t __wrap_esp_ds_encrypt_params_using_key_type(esp_ds_data_t *data,
const void *iv,
const esp_ds_p_data_t *p_data,
const void *key,
esp_ds_key_type_t key_type)
{
esp_crypto_sha_aes_lock_acquire();
esp_err_t err = esp_tee_service_call(6, SS_ESP_DS_ENCRYPT_PARAMS_USING_KEY_TYPE, data, iv, p_data, key, key_type);
esp_crypto_sha_aes_lock_release();
return err;
}
#endif
/* ---------------------------------------------- MPI ------------------------------------------------- */