Howto decrypt NVS manually?

hetjtpy
Posts: 1
Joined: Fri Jun 14, 2024 12:20 am

Howto decrypt NVS manually?

Postby hetjtpy » 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?

Who is online

Users browsing this forum: Orange_Murker and 102 guests