Page 1 of 1

Program code protection.

Posted: Thu Dec 12, 2019 8:40 am
by NPDedyukhin
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).

Re: Program code protection.

Posted: Thu Dec 12, 2019 9:31 am
by rpdom
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.

Re: Program code protection.

Posted: Thu Dec 12, 2019 11:32 am
by hippy
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.

Re: Program code protection.

Posted: Fri Dec 13, 2019 4:53 am
by NPDedyukhin
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 ;)