Is there a way to encrypt MicroPython codes?
-
- Posts: 11
- Joined: Thu May 23, 2019 9:57 am
Is there a way to encrypt MicroPython codes?
We have a unpaid project we write a lib for a Chinese company, now they ask ship them a pyborad to test our lib, so how can we encrypt the py file on pyborad? Bcoz the Chinese company is totally able to duplicate our codes and leave us a penny.
Re: Is there a way to encrypt MicroPython codes?
Not on any of the MicroPython systems I've used. Compiling to mpy will keep out the casual code browser, but the whole filesystem can always be cloned.
If one or other of you aren't being paid, that sounds like you don't have a contract in place. I'd fix that first.
If one or other of you aren't being paid, that sounds like you don't have a contract in place. I'd fix that first.
Re: Is there a way to encrypt MicroPython codes?
Unfortunately, even contracts are not generally enforceable when it comes to Chinese companies. Cross jurisdictional enforcement and a burden of proof are very, very expensive things.
You may need to reconsider your development board. One that natively supports encrypting firmware through the use of a dedicated secure encryption chip might help quite a bit. https://docs.pycom.io/advance/encryption/
You may need to reconsider your development board. One that natively supports encrypting firmware through the use of a dedicated secure encryption chip might help quite a bit. https://docs.pycom.io/advance/encryption/
Re: Is there a way to encrypt MicroPython codes?
That's one way to do encryption - but I'm guessing the pyboard removes the whole need for using the company in China.
There's also the very likely possibility that the partner company is far more interested in working with their next customer than keeping your data about and copying it for a possibly quite small and definitely uncertain return.
There's also the very likely possibility that the partner company is far more interested in working with their next customer than keeping your data about and copying it for a possibly quite small and definitely uncertain return.
Re: Is there a way to encrypt MicroPython codes?
There is a way to make .uf2 run on exactly one (Raspberry Pico) by encrypting the image with Pico's unique flash ID ...
https://www.raspberrypi.org/forums/view ... 3#p1862153
The .uf2 image can contain MicroPython code builtin as others have described.
https://www.raspberrypi.org/forums/view ... 3#p1862153
The .uf2 image can contain MicroPython code builtin as others have described.
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
Re: Is there a way to encrypt MicroPython codes?
Another option is to use an esp32 based module. First you can compile the py file as frozen code and append it to the firmware binary.
If you enable secure boot + flash encryption, you can ensure that the flash content cannot be cloned as the keys are stored inside fuses on the esp32.
If you enable secure boot + flash encryption, you can ensure that the flash content cannot be cloned as the keys are stored inside fuses on the esp32.
Christian Ehlers - Pycom
Re: Is there a way to encrypt MicroPython codes?
here is a link: viewtopic.php?t=6726
-
- Posts: 11
- Joined: Thu May 23, 2019 9:57 am
Re: Is there a way to encrypt MicroPython codes?
Oh mpy files, sounds a good idea, thanks. I think they're able to try some API, but they have no chance to scale the project from those mpy files, right?scruss wrote: ↑Thu Apr 01, 2021 7:37 pmNot on any of the MicroPython systems I've used. Compiling to mpy will keep out the casual code browser, but the whole filesystem can always be cloned.
If one or other of you aren't being paid, that sounds like you don't have a contract in place. I'd fix that first.
-
- Posts: 11
- Joined: Thu May 23, 2019 9:57 am
Re: Is there a way to encrypt MicroPython codes?
Wow, that may what I'm looking for, moreover i can put some of codes in github. Thanks!anakaine wrote: ↑Fri Apr 02, 2021 6:12 amUnfortunately, even contracts are not generally enforceable when it comes to Chinese companies. Cross jurisdictional enforcement and a burden of proof are very, very expensive things.
You may need to reconsider your development board. One that natively supports encrypting firmware through the use of a dedicated secure encryption chip might help quite a bit. https://docs.pycom.io/advance/encryption/
-
- Posts: 11
- Joined: Thu May 23, 2019 9:57 am
Re: Is there a way to encrypt MicroPython codes?
Honestly to say, Raspberry Pico isn't a good choice in China, considering a chip of ESP32 is below 1.2 US dollors, I'm afraid we have to supply ESP32/ESP8266 dev-board to the Chinese company. Thanks anyway.HermannSW wrote: ↑Tue May 25, 2021 6:20 pmThere is a way to make .uf2 run on exactly one (Raspberry Pico) by encrypting the image with Pico's unique flash ID ...
https://www.raspberrypi.org/forums/view ... 3#p1862153
The .uf2 image can contain MicroPython code builtin as others have described.