lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Jan 19, 2017 3:25 AM, "JM Venet Magic.fr" <jmvenet@magic.fr> wrote:
Hello,

I've coded a lua script and compiled it to a .bin file ...

I search a way to protect this .bin file to avoid that the users copy and use this .bin on other computers .

Is it possible, per example with a registration under an encrypted key of the HDD serial number in the registry ?

If OK, how to do it ?

Thanks for replying

JM Venet

What you're looking for is called DRM and doesn't really relate to Lua itself. You can encrypt/protect your data file however you like, but your app will need to decrypt it in memory before passing it to Lua. So ultimately the encryption method doesn't have anything to do with Lua.

I wouldn't recommend anything more complex than encrypting the file using a key derived from the system (eg disk serial number). That will be enough to prevent "casual" piracy (where non-technical users share files, maybe accidentally). If someone really *wants* to bypass your protections, there's not much you can do to prevent it - even multi-million-dollar industries have that problem.