Chat freely about anything...

User avatar
By panoss
#83771 Hi.
I want to protect the code in my ESP8266, to prevent others from reading it and duplicating it in other ESP8266s.
From what I read this is not possible.
But I also somewhere read that may be I can obfuscate the code.
How can I do this?
User avatar
By martinayotte
#83773
panoss wrote:Hi.
I want to protect the code in my ESP8266, to prevent others from reading it and duplicating it in other ESP8266s.
From what I read this is not possible.
But I also somewhere read that may be I can obfuscate the code.
How can I do this?

Use ESP32 instead, it has encryption ...
User avatar
By panoss
#83774 Yes I know about ESP32.
But I have a few ESP8266s and I was wondering if I can do something to protect their code.
I suppose I can't.
User avatar
By QuickFix
#83781 (Unfortunately?) no: the ESP8266 also doesn't have a fuse to protect the flash content and even if it did it would be very easy to just read the contents of the flash directly since it's externally connected. :idea:

You *might* be able to come up with some scheme that reads the unique serial of the ESP and check that upon boot, but then you'll have to build an image for each and every ESP you want to flash (and such schemes are generally quickly cracked or circumvented, as history teaches us).

BTW: Your code isn't uploaded to the ESP, rather the compiled version of it.
Obfuscating is generally used to make code harder to understand by humans, but your purpose seems to be to protect your software (either in code or in assembly) from being copied and used by someone else.