Chapter 2. API Reference
• Encrypt by allowing the utility to generate encryption keys:
python nvs_partition_gen.py encrypt sample_singlepage_blob.csv sample_encr.bin␣
,→0x3000 --keygen
Note: Encryption key of the following format <outdir>/keys/keys-<timestamp>.bin is created.
• Encrypt by allowing the utility to generate encryption keys and store it in provided custom filename:
python nvs_partition_gen.py encrypt sample_singlepage_blob.csv sample_encr.bin␣
,→0x3000 --keygen --keyfile sample_keys.bin
Note: Encryption key of the following format <outdir>/keys/sample_keys.bin is created.
Note: This newly created file having encryption keys in keys/ directory is compatible with NVS key-partition
structure. Refer to NVS key partition for more details.
• Encrypt by providing the encryption keys as input binary file:
python nvs_partition_gen.py encrypt sample_singlepage_blob.csv sample_encr.bin␣
,→0x3000 --inputkey sample_keys.bin
To decrypt encrypted NVS partition:
Usage:
python nvs_partition_gen.py decrypt [-h] [--outdir OUTDIR] input key␣
,→output
Positional Arguments:
+--------------+----------------------------------------------------------
,→------------+
| Parameter | Description ␣
,→ |
+==============+======================================================================+
| input | Path to encrypted NVS partition file to parse ␣
,→ |
+--------------+----------------------------------------------------------
,→------------+
| key | Path to file having keys for decryption ␣
,→ |
+--------------+----------------------------------------------------------
,→------------+
| output | Path to output decrypted binary file ␣
,→ |
+--------------+----------------------------------------------------------
,→------------+
Optional Arguments:
+---------------------+---------------------------------------------------
,→-----------------+
| Parameter | Description ␣
,→ |
+=====================+====================================================================+
| -h, --help | show this help message and exit ␣
,→ |
(continues on next page)
Espressif Systems 730
Submit Document Feedback
Release v4.4