DEV Community

Discussion on: How to encrypt the NVS volume on the ESP32

Collapse
 
achrafboussaada profile image
Achraf Boussaada

Thanks for the reply. I just realised that you need to create another partition to store the keys, and the partition should be flaged as encrypted. I'm sorry if this seems obvious, but I'm new to this, is there no security risk doing this?

Thread Thread
 
kkentzo profile image
Kyriakos Kentzoglanakis

The partition that stores the encryption keys for the nvs partition is itself encrypted by the device (handled by the bootloader -- more info here. The reason for the existence of the keys partition is that the esp32 does not (yet?) handle the encryption of an nvs partition transparently, so we have to do it ourselves.

Thread Thread
 
achrafboussaada profile image
Achraf Boussaada

Thanks. Final question about the keys partition. According to the documentation the partition needs to have a encrypted flag. Did you add it manually when creating the partition from the CSV file?