Sending encrypted flash content via esptool.py
Posted: Tue Sep 18, 2018 3:39 pm
Hi,
Is it possible to send pre-encrypted program to flash using esptool.py. This will speed up production process without waiting esp32 encrpyt by itself the content with possible side effect to brick the device if power is removed as state in online doc:
My process would be (it is a summary of what I have understood from docs
https://docs.espressif.com/projects/esp ... yption-key):
-generate a key with
-fuse the key into eFuse with
-encrypt my program with the key
- use esptool.py to send encrypted content to esp32 esptool.py --port PORT --baud 460800 write_flash 0x10000 build/program-encrypted.bin
I didn't understand if I can do this the very time I program the esp32 or only after an esptool.py session with plaintext firmware.
Thanks
Is it possible to send pre-encrypted program to flash using esptool.py. This will speed up production process without waiting esp32 encrpyt by itself the content with possible side effect to brick the device if power is removed as state in online doc:
Important
Do not interrupt power to the ESP32 while the first boot encryption pass is running. If power is interrupted, the flash contents will be corrupted and require flashing with unencrypted data again. A reflash like this will not count towards the flashing limit.
My process would be (it is a summary of what I have understood from docs
https://docs.espressif.com/projects/esp ... yption-key):
-generate a key with
Code: Select all
espsecure.py generate_flash_encryption_key My_encryption_key.bin
Code: Select all
espefuse.py --port PORT burn_key flash_encryption My_encryption_key.bin
Code: Select all
espsecure.py encrypt_flash_data --keyfile My_encryption_key.bin --address 0x10000 -o build/program-encrypted.bin build/program.bin
I didn't understand if I can do this the very time I program the esp32 or only after an esptool.py session with plaintext firmware.
Thanks