Flash Encryption Problem

marius.cezar18
Posts: 8
Joined: Mon May 16, 2022 10:41 am

Flash Encryption Problem

Postby marius.cezar18 » Thu May 26, 2022 2:12 pm

Hello, please help me with encrypting a flash to go into production with the application.
I want to make sure my application is not copied and I can't, I kept reading and trying some methods but without success!
I generated a flash key:

Code: Select all

python ./espsecure.py generate_flash_encryption_key my_flash_encryption_key.bin
after which I wrote the key in esp32:

Code: Select all

python ./espefuse.py --port COM3 burn_key flash_encryption my_flash_encryption_key.bin
As far as I understand, if I write the flash via serial com, does it encrypt the plain text and then write?

Code: Select all

python ./esptool.py --port COM3 --baud 115200 write_flash 0x10000 app_unencrypted.bin
From what I read the boot section can be encrypted the same as the above steps with key generation and key writing in esp32, I would need the exact steps that are to be followed to secure boot and flash + efuse, can someone help me please!

ESP_Mahavir
Posts: 188
Joined: Wed Jan 24, 2018 6:51 am

Re: Flash Encryption Problem

Postby ESP_Mahavir » Sat May 28, 2022 7:46 am

Hello,

Please follow instructions from https://docs.espressif.com/projects/esp ... erated-key for enabling flash encryption workflow with host generated keys.

Please note that, you must pass "write_flash --encrypt" arguments to esptool to flash encrypted binaries (using eFuse flash encryption key). This can also be achieved with "idf.py encrypted-app-flash" or "idf.py encrypted-flash" commands.

Hope this helps!

marius.cezar18
Posts: 8
Joined: Mon May 16, 2022 10:41 am

Re: Flash Encryption Problem

Postby marius.cezar18 » Mon Jun 06, 2022 7:34 am

Thanks!!!

Who is online

Users browsing this forum: No registered users and 109 guests