#423·esptool

Supply encryption key to write_flash --encrypt (ESPTOOL-133)

Author: jeremyherbertCreated Apr 10, 2019Updated Dec 10, 2020

In the latest commits, it seems that writing encrypted files is now supported. Is this feature intended to only be used when flash encryption debugging is enabled? It seems like the commands in the test do not allow a key to be specified.

self.run_esptool("write_flash --encrypt --ignore-flash-encryption-efuse-setting 0x10000 images/helloworld-esp32_edit.bin")

I currently have a bunch of custom scripts which encrypt the app locally and flash it; this is because each device has a unique encryption key. It would be neat to get rid of them all and use something like write_flash --encrypt-with-key=aes_key.bin 0x10000 data.bin 0x20000 data2.bin

Is this possible with the new changes?