espressif / esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
https://espressif.github.io/esptool-js/
Apache License 2.0
291 stars 108 forks source link

Support for Flash encryption and Secure Boot? #95

Open mrninhvn opened 1 year ago

mrninhvn commented 1 year ago

How to flash secure boot enabled chip and have flash encryption? Is this implemented?

risoul commented 1 year ago

I second that. My goal is using esptool-js to provide upgrades to my users, but I do not want show original code of the .bin

mrninhvn commented 1 year ago

I do not want show original code of the .bin

I solved flashing, however the .bin file is always displayed when you check resources with dev tools.

risoul commented 1 year ago

As i understand, you talk about .bin server side? then it is not encrypted?

I found this about encryption : https://www.motius.com/post/how-to-build-a-secure-iot-prototype-with-arduino-and-esp32 Using arduino to code then esp-idf to encrypt

But I do not know if it can be flashed with esptool-js

fukaminakrize commented 11 months ago

Hello, I would too like to ask about any plans for supporting flash encryption in esptool-js.

mrninhvn commented 7 months ago

My modification to support Secure Boot and Flash Encryption. Enjoy! https://github.com/mrninhvn/esptool-js/tree/encrypted-flash

chipweinberger commented 7 months ago

@mrninhvn , how do I run your fork? Can you host it on github? That would be great.


is anyone else getting "unsupported command error"?

https://github.com/espressif/esptool-js/issues/139

mrninhvn commented 7 months ago

@mrninhvn , how do I run your fork? Can you host it on github? That would be great.

You can build this example or modify esp-web-tool to use the enc-esptool-js module. I do a quick deloy here: https://mrninhvn.github.io/esptool-js/

brianignacio5 commented 2 months ago

Could you try https://github.com/espressif/esptool-js/pull/145 ? @mrninhvn @risoul @chipweinberger