Readproof Code

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Posts: 14
Joined: Mon Dec 10, 2018 6:37 am

Readproof Code

Post by Nikunj_Vadher » Tue Aug 13, 2019 5:06 pm

I am using micropython to develop a product.
Is there any way to make device read proof ?
Means user can't read code which I have uploaded in esp8266.

User avatar
Posts: 1568
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Readproof Code

Post by Roberthh » Tue Aug 13, 2019 7:14 pm

As a simple measure you can use frozen bytecode, which embeds compiled code into flash. Then there is no python code in the file system except maybe or But even the code there can be compiled into flash, or put into, which anyhow resides in the flash memory. Still, people could read out the flash and decompile it, but that is some work to do. Except for strings, which can be easily extracted.

User avatar
Posts: 3538
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Readproof Code

Post by pythoncoder » Wed Aug 14, 2019 5:27 am

There are also obfuscators such as pyminifier. You could presumably freeze obfuscated code to combine both approaches. I perhaps should point out that haven't used the obfuscation feature of pyminifier with MicroPython.
Peter Hinch

Posts: 2
Joined: Thu Sep 05, 2019 12:54 pm

Re: Readproof Code

Post by fj604 » Thu Sep 05, 2019 3:55 pm

Compiled bytecode is still stored on an external flash chip, so there is no way to protect it from copying. If ESP8266 can read the contents of this flash chip then so can any other device.

Post Reply