mbedtls_aes_crypt_ecb VS mbed_internal_aes_encrypt ESP32
Posted: Thu Apr 18, 2019 6:57 am
by skxo66
Hello,
I am using these two functions in two different firmware to create AES-ECB function on ESP32.
- What are the difference please (in the context of ESP32 of course)?
- Which one use the HW aes core of the EPS32?
- Is one of them deprecated?
thanks!
sk
Re: mbedtls_aes_crypt_ecb VS mbed_internal_aes_encrypt ESP32
Posted: Thu Apr 18, 2019 10:18 am
by esp_Hemal
Hi sk,
mbedtls_aes_crypt_ecb() function accepts mode (encrypt/decrypt) as one of the arguments so it can do both. Whereas mbedtls_internal_aes_encrypt() performs only encryption. Later one gets called from previous if the mode is selected as 'encrypt'. If AES HW acceleration is enabled (through menuconfig option) mbedtls_internal_aes_encrypt() would perform single block AES encryption using aes hardware
As per mbedtls documentation none of these are deprecated.
https://tls.mbed.org/api/aes_8h.html#ad ... b0d018be35
Rather mbedtls_internal_aes_encrypt() is superseded by mbedtls_aes_encrypt() and mbedtls_internal_aes_decrypt() is superseded by mbedtls_aes_decrypt()
Re: mbedtls_aes_crypt_ecb VS mbed_internal_aes_encrypt ESP32
Posted: Sat Apr 20, 2019 6:52 am
by skxo66
Hi esp_Hemal,
thanks for your detailed answer.
Regards
sk