Using read protected AES keys from application code
Posted: Sat Apr 01, 2023 5:56 pm
ESP32-C3 and similar parts let you set an XTS_AES_128_KEY efuse block that is write and read protected so that only internal ROM code can access it for flash encryption and decryption.
Is there a way do something similar for general purpose AES crypto through mbedtls or even direct ROM calls? For example, I'd like to set BLOCK_KEY5 to a USER key, and read and write protect it, then be able to tell the AES ROM to load that key.
I've looked around /components/hal and /components/mbedtls/port/aes/ but don't see anything that indicates you can pass a efuse identifier in for an AES key. Have I missed something? If not, this would be a nice feature and most of it appears to be there already.
Is there a way do something similar for general purpose AES crypto through mbedtls or even direct ROM calls? For example, I'd like to set BLOCK_KEY5 to a USER key, and read and write protect it, then be able to tell the AES ROM to load that key.
I've looked around /components/hal and /components/mbedtls/port/aes/ but don't see anything that indicates you can pass a efuse identifier in for an AES key. Have I missed something? If not, this would be a nice feature and most of it appears to be there already.