Encrypted trial execution function

2 次查看(过去 30 天)
Hello!
I need to create a function for trial execution (for distribution) of it: when I run a function for the first time it should writes "You may use it for 30 of 30 iterations" after one use "You may use it for 29 of 30 iterations" and so on... When it is "0 of 30" it stops to execute and writes "Your trial is over".
But the most important thing is that this function should be encripted and cannot be hacked for minutes.
Any thoughts?

采纳的回答

Jan
Jan 2013-5-25
Where do you want to store the number of performed iterations? Any changes on the hard-disk can be reset easily, therefore neither a file nor the registry (also a file...) is a save location. Storing the counter in the memory is very volatile also.
Therefore you have to control the counter on your own internet server and the user needs an active internet connection. This is an even more brute control than Microsoft, Adobe and MathWorks have invented to protect their software.
Encrypting the code is fragile also: Matlab is an interpreted language and the debugger and overloaded built-in function can reveal, what's going on inside your code. Methods for restricted access can be cheated easily in consequence.
Even the encrypted boot-loader of the Galaxy S4 has been hacked after 4 week already. Here it was not required to decrypt the program, but moving it around in the memory until the function for the test of the signature is at a certain location, where it can be replaced by a trivial function, which replies, that the code has passed the tests. And remember, that there are a lot of millions of dollars behind Samsungs phones.
Therefore my conclusion is easy: Forget it. There are no stable restrictions in Matlab, which require more than 30 minutes to be broken. Developing a program, which controls the access through an encrypted internet connection to a server you own, is much more expensive than these two solutions:
  1. Buy a used laptop, install Matlab, P-code your functions, determine a hardware ID (see http://undocumentedmatlab.com/blog/unique-computer-id/ ), hard-code it into the P-file. Then borrow the laptop for a week only. Customer hesitate to steal hardware, while software is copied without qualm.
  2. Setup Matlab locally and let the customer run the program through a TeamViewer session or any other remote desktop service.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by