Howto decrypt NVS manually?
Posted: Fri Jun 14, 2024 12:35 am
hi, I have ESP32c3 with encryption enabled. The NVS encryption is enabled too. I pre-generate NVS key using nvs_partition_gen.py. Then I flash it onto respective partition called "nvs-keys". Everything works correctly, both the flash and NVS are encrypted, and I can write and read back values.
But now for the sake of learning, I want to download the NVS partition and decrypt it so that it is viewable using nvs_tool for example. To do that I firstly decrypt the flash drive successfully (I know the key). Then I get the 20K partition that contains the NVS and I save it to my_nvs.bin.
When I run nvs_partition_gen.py decrypt my_nvs.bin my_nvs_key.bin my_decrypted_nvs.bin it will not produce decrypted data. Why?
But now for the sake of learning, I want to download the NVS partition and decrypt it so that it is viewable using nvs_tool for example. To do that I firstly decrypt the flash drive successfully (I know the key). Then I get the 20K partition that contains the NVS and I save it to my_nvs.bin.
When I run nvs_partition_gen.py decrypt my_nvs.bin my_nvs_key.bin my_decrypted_nvs.bin it will not produce decrypted data. Why?