7
$\begingroup$

After hours of work trying to understand how much protection I can get when creating stand-alone CDF applications I have come to the decision that the best protection to my work is provided by creating packages which should be encrypted using Encode with a password, and protecting the functions in the package with the Protected, Locked, and ReadProtected attributes. This video clearly explains how to create such packages. If I'm right, then the best protection is provided to applications that are not full stand-alone as these packages need to be installed for the application to run (note that Needs is part of the code in the screen cast referenced above).

If I'm right, it is possible to create full stand-alone applications (not dependent on Needs) by removing the attributes previously mentioned but then the functions would easily be visible to users with enough knowledge and interest in my work.

In summary, I'm using Enterprise Mathematica trying to create a single-file stand-alone CDF and apparently that is not possible. Thus, my question is whether I'm right or not. Or, is it possible to create full stand-alone applications which protect functions with the Locked, Protected, ReadProtected attributes?

If the answer is no, then I think that we should vote here to call Wolfram's attention to help us use this excellent technology to build easy to install applications that don't put our work, our businesses, and our clients security on risk.

$\endgroup$
  • $\begingroup$ How would you like to provide the pass the password by the user? $\endgroup$ – Kuba May 29 '15 at 15:03
  • $\begingroup$ You should be able to DumpSave your code with encryption. I can imagine that you could then store the resulting code inside your CDF as strings, and convert it to .mx files dynamically to then use Get on them, and then possibly delete them. That assumes that enterprise CDF allows you to write to some writable directory. I haven't done this, so don't know if such procedure works or not. The advantage of .mx files is that when they are loaded, this process does not go through the top-level evaluator, so there is no way that one could intercept the loading using Block etc. $\endgroup$ – Leonid Shifrin May 29 '15 at 15:19
  • $\begingroup$ I don't think I'm following you. In case you are asking about password protecting my work, I could do that by a dynamic expression that checks the MachineID or LicenseID and asks the user to type a valid license key when the application is run on a new machine. The password used in the Encode would only work as a way of locking the code but the user shouldn't even know that the CDF depends on encrypted functions. Maybe I'm missing a key point. Could you rephrase or provide additional details? $\endgroup$ – Ariel Sepulveda May 29 '15 at 15:23
  • $\begingroup$ @LeonidShifrin: I don't think that DumpSave is platform-independent. $\endgroup$ – Ariel Sepulveda May 29 '15 at 15:24
  • $\begingroup$ @ArielSepulveda It is, since V10 (but still depends on bitness - 64 or 32 bits. But 32 bits can probably be ignored at this point). But even if you use older versions, I don't see a big problem here - you would just need to prepare several versions of the code for different platforms. $\endgroup$ – Leonid Shifrin May 29 '15 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.