How can I protect files other than .m file with Matlab compiler?

5 visualizzazioni (ultimi 30 giorni)
After I compiled the matlab files and other non-matlab files successfully, I found that when users run the executable files, the extraction of the executable will expand all files into temporary folders. All Matlab files are encrypted but all other files are just original files without any protection (not encrypted). Do you have any idea to protect the non-matlab files as well? Thanks.
  1 Commento
Walter Roberson
Walter Roberson il 4 Feb 2018
Mathworks does not provide any facility for this.
In some cases, you could use your own encryption function. However some routines such as imread() only read from unencrypted files, so you might have to do a notable amount of work to replace those functions, such as finding a combination of Java stream functions that can process them.

Accedi per commentare.

Risposte (1)

Jan
Jan il 5 Feb 2018
If you want to deliver encrypted files, encrypt them before the compilation. Then you Matlab code must contain the required decryption methods.
Remember that the keys for the decryption must be included in your compiled code. Then the keys can be found more or less easily also. If the files should be read by standard methods like imread, load etc., this will not work directly. Decrypting the files at first will leave clear text data on the disk.
  6 Commenti
Zheng Yan
Zheng Yan il 5 Feb 2018
Hi Walter, this is very useful information. Thanks for your detailed explanations.
Walter Roberson
Walter Roberson il 5 Feb 2018
In my experience, the easiest way to ensure that no-one will defeat your encryption system, is to make your program bug-ridden and useless: if the "value" available to be extracted from your program is pretty much zero, then it is not worth anyone's time to analyze it.

Accedi per commentare.

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by