Flash encryption and boot secure with esptool
Posted: Fri Aug 17, 2018 9:17 am
Good afternoon.
As i understood esp32's protect separated on two parts:
1 - My programm can be encrypted by espsecure (esptool script), and then decrypted by esp32 using key saved at block_1 fuse before.
2 - Bootloader secure it's something hard. I can't understand it at this moment.
So to secure my programm with Flash encryption i do:
1 - espsecure.py generate_flash_encryption_key key.bin
2 - espefuse.py --port /dev/ttyUSB0 burn_key flash_encryption key.bin
3 - espsecure encrypt_flash_data --keyfile key.bin --address 0x10000 -o my-app-encrypted.bin my-app.bin
4 - flash my-app-encrypted.bin to the esp32.
All's right?
If i'm fine, pls, explain about bootloader secure?
How it's works.
What to do in step by step.
I will be very grateful!
As i understood esp32's protect separated on two parts:
1 - My programm can be encrypted by espsecure (esptool script), and then decrypted by esp32 using key saved at block_1 fuse before.
2 - Bootloader secure it's something hard. I can't understand it at this moment.
So to secure my programm with Flash encryption i do:
1 - espsecure.py generate_flash_encryption_key key.bin
2 - espefuse.py --port /dev/ttyUSB0 burn_key flash_encryption key.bin
3 - espsecure encrypt_flash_data --keyfile key.bin --address 0x10000 -o my-app-encrypted.bin my-app.bin
4 - flash my-app-encrypted.bin to the esp32.
All's right?
If i'm fine, pls, explain about bootloader secure?
How it's works.
What to do in step by step.
I will be very grateful!