User avatar
NPDedyukhin
Posts: 30
Joined: Fri Sep 20, 2019 3:23 am
Location: RU

Program code protection.

Thu Dec 12, 2019 8:40 am

Good day! :)

In order to protect the source code for the future device, I was interested in this question:

What parameter can be used that is unique for a particular raspberry pi device to bind the program code to this parameter?

For example, a cell phone has an IMEI code.

I want to check before running the script: if (parameter) = xxx, then (run the script), otherwise (give an error message).
Respectfully,
Nikita Dedyukhin

User avatar
rpdom
Posts: 16987
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Program code protection.

Thu Dec 12, 2019 9:31 am

The closest you get to that on a Pi is the serial number, but they are not completely unique (for Pi Zero to 3, at least). Also, depending on the method used to read the serial number, it isn't hard to fake it.

In addition, as long as someone has physical access to the Pi and SD card, they could pretty much bypass anything you can do to secure your software.

This question has been asked and answered many times.
Unreadable squiggle

hippy
Posts: 7390
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Program code protection.

Thu Dec 12, 2019 11:32 am

And, being posted in the Python section of the forum, if your program is written in Python there are only limited options to protect that from prying eyes and circumventions. Even if you are only shipping .pyc files they can easily be turned into readable, editable, source code.

User avatar
NPDedyukhin
Posts: 30
Joined: Fri Sep 20, 2019 3:23 am
Location: RU

Re: Program code protection.

Fri Dec 13, 2019 4:53 am

rpdom wrote:
Thu Dec 12, 2019 9:31 am
The closest you get to that on a Pi is the serial number, but they are not completely unique (for Pi Zero to 3, at least). Also, depending on the method used to read the serial number, it isn't hard to fake it.

In addition, as long as someone has physical access to the Pi and SD card, they could pretty much bypass anything you can do to secure your software.

This question has been asked and answered many times.
Well, if so, then we will focus on quality service ;)
Respectfully,
Nikita Dedyukhin

Return to “Python”