Page 1 of 1
ESP32-S2 HMAC
Posted: Mon Jul 13, 2020 10:14 am
by renatopinheiro
Hi,
If I set an HMAC efuse key is possible to rewrite? (
https://docs.espressif.com/projects/esp ... on-outline)
If not, is possible to test the HMAC without writing the key to the efuse?
Re: ESP32-S2 HMAC
Posted: Mon Jul 13, 2020 10:22 am
by chegewara
Probably an espressif team member should confirm that, but HMAC is supported:
https://esp32.com/viewtopic.php?f=10&p=56361
Re: ESP32-S2 HMAC
Posted: Fri Jul 17, 2020 10:17 am
by renatopinheiro
Anyone can help?
Re: ESP32-S2 HMAC
Posted: Fri Jul 17, 2020 2:31 pm
by ESP_Sprite
Not sure about the HMAC capabilities, but in general it's physically impossible to re-write an eFuse once it's blown.
Re: ESP32-S2 HMAC
Posted: Sun Jul 19, 2020 11:26 pm
by ESP_Angus
Hi renatopinheiro,
Sprite is correct, eFuse blocks are write-once and cannot be updated, and the hardware HMAC peripheral can only source the key from the eFuse block. If you want to calculate an HMAC from a key in memory, you can do this with the mbedTLS APIs in ESP-IDF (the SHA operation is still accelerated so the operation is just as fast).
Note also that there are 5 eFuse key blocks available in the ESP32-S2, and you can select which key block to read the key from each time the HMAC peripheral is used. So if you write one key block to do some initial tests, you still have some options to write other blocks later.
Angus
Re: ESP32-S2 HMAC
Posted: Mon Jul 20, 2020 9:04 am
by renatopinheiro
Thanks, Angus and Sprite.