feat(mbedtls): Support both SHA block and DMA modes during runtime

Dynamically switch the SHA operation modes based on the buffer operating length
This commit is contained in:
harshal.patil
2025-02-04 16:49:30 +05:30
parent 2e708d1a7d
commit 7d8211bf87
28 changed files with 458 additions and 1271 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -211,6 +211,11 @@ int __wrap_esp_sha_dma(esp_sha_type sha_type, const void *input, uint32_t ilen,
return esp_tee_service_call(7, SS_ESP_SHA_DMA, sha_type, input, ilen, buf, buf_len, is_first_block);
}
int __wrap_esp_sha_block(esp_sha_type sha_type, const void *data_block, bool is_first_block)
{
return esp_tee_service_call(4, SS_ESP_SHA_BLOCK, sha_type, data_block, is_first_block);
}
void __wrap_esp_sha_read_digest_state(esp_sha_type sha_type, void *digest_state)
{
esp_tee_service_call(3, SS_ESP_SHA_READ_DIGEST_STATE, sha_type, digest_state);