I'll show you the step-by-step that I followed to encrypt my ESP.
Code: Select all
espsecure.py generate_flash_encryption_key ./key.bin
espefuse.py --port (PORT) burn_key flash_encryption ./key.bin
espefuse.py --port (PORT) burn_efuse FLASH_CRYPT_CNT
espefuse.py --port (PORT) burn_efuse FLASH_CRYPT_CONFIG 0x0F
espsecure.py encrypt_flash_data --keyfile ./key.bin --address 0x1000 -o build/bootloader/bootloader_encrypted.bin build/bootloader/bootloader.bin
espsecure.py encrypt_flash_data --keyfile ./key.bin --address 0x8000 -o build/partition_table/partition-table-encrypted.bin build/partition_table/partition-table.bin
espsecure.py encrypt_flash_data --keyfile ./key.bin --address 0x10000 -o build/project_name_encrypted.bin build/project_name.bin
Code: Select all
C:\Espressif\python_env\idf4.4_py3.11_env\Scripts\python.exe ..\..\..\..\..\..\Espressif\frameworks\esp-idf-v4.4.5\components\esptool_py\esptool\esptool.py -p COM3 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x1000 build/bootloader/bootloader_encrypted.bin 0x8000 build/partition_table/partition-table-encrypted.bin 0x10000 build\project_name_encrypted.bin
Code: Select all
idf.py --port <PORT> monitor
Code: Select all
'C:\Espressif\frameworks\esp-idf-v4.4.5\tools\idf.py' '--port' 'COM3'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM3 instead...
--- idf_monitor on \\.\COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371