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.
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 useGet
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 usingBlock
etc. $\endgroup$