DRM is self-defeating (was: Encrypt python files)

Ben Finney ben+python at benfinney.id.au
Wed May 6 03:41:53 EDT 2015


Palpandi <palpandi111 at gmail.com> writes:

> On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote:

> > What are the ways to encrypt python files?
>
> No, I just want to hide the scripts from others.

Which others? You can hide the scripts from them by never showing those
others the scripts. If you don't trust a recipient, don't let them
receive the file.

I suspect you are asking “how can I distribute Python modules to people
without those people being able to read them”? You can't, because
executing the file requires reading its contents.

Anyone who has a machine that can execute the file has a machine that
must, by necessity, read its contents.


This is the dilemma of those who think they want Digital Restrictions
Management (DRM): attempting to treat recipients as untrustworthy, while
still telling them they can use the files.

If you a person is in possession of the file you're trying to restrict,
on a machine they possess, with a key needed to unlock the content, then
that person is in possession of everything needed to unlock the content.

On the other hand, if one of those (e.g. the key to unlock the content)
is missing, then the file is useless for whatever you're saying the
recipient can do with it.

The only feasible solution is to distribute files only to those
recipients you want to have them, and can trust to do with them as you
ask. If you don't trust a recipient, don't hand the files to them.


On the other hand, if you're asking something else, you will need to be
much more explicit. You have not helped us understand what you want thus
far.

-- 
 \        “This sentence contradicts itself — no actually it doesn't.” |
  `\                                               —Douglas Hofstadter |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list