Using DS peripheral with mbedtls to decrypt data
Posted: Thu Jan 13, 2022 6:16 am
On the ESP32-C3 I'd like to use a private RSA key stored on the device to decrypt data. While I could store the private key in encrypted NVS, I thought it would be nice to use the DS peripheral instead. Ideally the private key would then never need to be seen by the application code.
I followed https://docs.espressif.com/projects/esp ... ls/ds.html to configure the DS peripheral but I've only found docs and code using that for signatures rather than decryption.
I realize mbedtls itself has mbedtls_pk_decrypt https://tls.mbed.org/kb/how-to/encrypt- ... t-with-rsa but I don't see a way to connect that to the DS peripheral to get the private key. Have I missed something or is that not connected? While not ideal, is it possible to load the decrypted rsa pk from the DS peripheral in application code?
I followed https://docs.espressif.com/projects/esp ... ls/ds.html to configure the DS peripheral but I've only found docs and code using that for signatures rather than decryption.
I realize mbedtls itself has mbedtls_pk_decrypt https://tls.mbed.org/kb/how-to/encrypt- ... t-with-rsa but I don't see a way to connect that to the DS peripheral to get the private key. Have I missed something or is that not connected? While not ideal, is it possible to load the decrypted rsa pk from the DS peripheral in application code?