ESP32 OTA with encrypted firmware

hoainguyen265
Posts: 10
Joined: Tue Nov 13, 2018 8:17 am

ESP32 OTA with encrypted firmware

Postby hoainguyen265 » Fri Dec 28, 2018 8:48 am

https://docs.espressif.com/projects/esp ... ption.html
In ESP document for flash encryption i found
OTA updates to encrypted partitions will automatically write encrypted, as long as the esp_partition_write function is used.
And in

Code: Select all

esp_ota_write
we use

Code: Select all

esp_partition_write
It mean the firmware ota is must be plaintext firmware.
But i want to do ota with encrypted firmware. This is a requirement for production.
Based on IDF document, i think i have to modified

Code: Select all

esp_partition_write
for write unencrypted data.

Is there any solution for this?
I also looking for ESP32 production guide.

jcsbanks
Posts: 305
Joined: Tue Mar 28, 2017 8:03 pm

Re: ESP32 OTA with encrypted firmware

Postby jcsbanks » Fri Dec 28, 2018 11:44 am

If you use https to fetch the firmware, and authenticate the ESP32, would that be a solution? This is what I am planning, to solve what sounds like a similar problem.

An alternative would be to encrypt the firmware to the individual device before sending it, will find and post the link...


Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP32 OTA with encrypted firmware

Postby Ritesh » Fri Dec 28, 2018 6:26 pm

hoainguyen265 wrote:
Fri Dec 28, 2018 8:48 am
https://docs.espressif.com/projects/esp ... ption.html
In ESP document for flash encryption i found
OTA updates to encrypted partitions will automatically write encrypted, as long as the esp_partition_write function is used.
And in

Code: Select all

esp_ota_write
we use

Code: Select all

esp_partition_write
It mean the firmware ota is must be plaintext firmware.
But i want to do ota with encrypted firmware. This is a requirement for production.
Based on IDF document, i think i have to modified

Code: Select all

esp_partition_write
for write unencrypted data.

Is there any solution for this?
I also looking for ESP32 production guide.
Hi,

Why you want OTA Firmware at time of production time? Because I believe you will just flash firmware using ESP32 tool at time of production and then user will update firmware using OTA based on requirements into device.

But it will be good to have encrypted firmware because of security.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Majestic-12 [Bot] and 95 guests