ESP32-S2 HMAC

renatopinheiro
Posts: 7
Joined: Thu Apr 09, 2020 2:25 pm

ESP32-S2 HMAC

Postby renatopinheiro » Mon Jul 13, 2020 10:14 am

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?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-S2 HMAC

Postby chegewara » Mon Jul 13, 2020 10:22 am

Probably an espressif team member should confirm that, but HMAC is supported:
https://esp32.com/viewtopic.php?f=10&p=56361

renatopinheiro
Posts: 7
Joined: Thu Apr 09, 2020 2:25 pm

Re: ESP32-S2 HMAC

Postby renatopinheiro » Fri Jul 17, 2020 10:17 am

Anyone can help?

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S2 HMAC

Postby ESP_Sprite » Fri Jul 17, 2020 2:31 pm

Not sure about the HMAC capabilities, but in general it's physically impossible to re-write an eFuse once it's blown.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32-S2 HMAC

Postby ESP_Angus » Sun Jul 19, 2020 11:26 pm

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

renatopinheiro
Posts: 7
Joined: Thu Apr 09, 2020 2:25 pm

Re: ESP32-S2 HMAC

Postby renatopinheiro » Mon Jul 20, 2020 9:04 am

Thanks, Angus and Sprite. :D

Who is online

Users browsing this forum: MSN [Bot] and 194 guests