Encrypted OTA firmware

kuhatovuk
Posts: 21
Joined: Thu Aug 01, 2019 8:46 pm

Re: Encrypted OTA firmware

Postby kuhatovuk » Thu Oct 10, 2019 7:43 pm

Thank you ! Is it better to keep the secret key in the firmware or eFuse BLK3 ? Thank you again.

EDIT: Just read I wouldn't have access to BLK3 from program if I read protect it so it's not good. Should I instead add a small encrypted flash partition to hold the key ?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Encrypted OTA firmware

Postby ESP_Angus » Thu Oct 10, 2019 11:36 pm

kuhatovuk wrote:
Thu Oct 10, 2019 7:43 pm
Thank you ! Is it better to keep the secret key in the firmware or eFuse BLK3 ? Thank you again.

EDIT: Just read I wouldn't have access to BLK3 from program if I read protect it so it's not good. Should I instead add a small encrypted flash partition to hold the key ?
Storing it in flash is necessary, for the reason you describe.

You could store it in the NVS partition if NVS encryption is enabled, or you can simply compile it into the firmware as a string.

lucalorenzoni
Posts: 1
Joined: Tue Oct 27, 2020 2:10 pm

Re: Encrypted OTA firmware

Postby lucalorenzoni » Tue Oct 27, 2020 2:26 pm

Hy,
I follow instruction to implement Encrypted OTA Firmware.
I have a factory partition + 2 OTAs partitions.
All works good, except when I try OTA ecrypted update.
The OTA update procedure runs without errors, but when ESP32 reboot idf.py monitor tells me

E (117) boot: ota data partition invalid, falling back to factory

I really cannot understand what is wrong.
Someone can help me?

k.shyshkin
Posts: 1
Joined: Fri Nov 27, 2020 7:41 pm

Re: Encrypted OTA firmware

Postby k.shyshkin » Fri Nov 27, 2020 7:48 pm

@lucalorenzoni hello. Do you solve problem with upload pre-encrypted FW to ota partition? I see in your last message that you decrypt fw and upload it decrypted to partition. How you do that? Can you shared part of your code where you reciev chunk of your pre-encrypted firmware, decrypt it, and write to flash? Is it possible do by chunks?

Who is online

Users browsing this forum: No registered users and 73 guests