Apps comiler in Mac version of Matlab

1 view (last 30 days)
Dear MathWorks Team,
We, Centre for Marine Science and Technology of Curtin University have developed a Matlab toolbox called CHORUS (Gavrilov A.N. and Parsons M.J.G. (2014), “A Matlab tool for the Characterisation Of Recorded Underwater Sound (CHORUS)”, Acoustics Australia v.42, No.3, pp. 190-196) for analysis of ocean noise data, including whale detection. The toolbox is under ongoing improvement to include more models of underwater sound recorders and new features. All routines needed to work with the main program CHORUS GUI where compiled into a stand-alone CHORUS.exe program in Windows to allow researchers with little experience in Matlab to work with CHORUS. It’s available from our website. Recently we decided to make it available for Mac users as well. We compiled the package on a Mac computer and the resulting CHORUS.app works well on Mac machines.
However, when I copied CHORUS.app into a Windows-based computer, I saw it as a folder with many subfolders. It wouldn’t be critical, if one of the subfolders didn’t contain all source codes which we wouldn’t want to be publicly available. Please, let us know, if there is any way to hide the source code in the application compiled on a Mac.
Thanks, Alexander

Accepted Answer

Rik
Rik on 21 May 2021
I don't know the actual answer, but you might try p-code. It is not fool-proof, but it is fairly tricky to find the way to decompile back to the original m-code.
Another layer of obfuscation you could use is my minify function, which you can use to remove comments and rename functions and variables.
Either method will only work for the back-end of your application, but that shouldn't be an issue, as a GUI should be an interface between the user and your 'real' functions.
  2 Comments
Alexander Gavrilov
Alexander Gavrilov on 21 May 2021
Thanks Rik for a prompt reply and advice. We will try both oprions and let Matlab community know about results
through this post.
Best regards, Alex
Rik
Rik on 21 May 2021
You're very much welcome. I would recommend combining the two.
You should note that neither is a perfect solution or will provide actual security. For that you would probably need to compile a binary from obfuscated generated C (or C++). Depending on how important keeping your source secret is to you, that might or might not be too much effort.

Sign in to comment.

More Answers (1)

Steven Lord
Steven Lord on 21 May 2021
If you're generating a standalone application using MATLAB Compiler, your files are turned into a deployable archive that is encrypted using the AES cryptosystem. If you try looking at the contents one of the files from that archive I would be very surprised if you could read it.
  4 Comments
Alexander Gavrilov
Alexander Gavrilov on 23 May 2021
Many thanks Walter. Yes, the names of Matlab source code files are seen in Windows as .m files, but when I try to open any of them, I see the contents encrypted. Alex
Alexander Gavrilov
Alexander Gavrilov on 23 May 2021
PS. I'm really sorry that I haven't check this before sending a request to MathWorks.

Sign in to comment.

Categories

Find more on Application Deployment in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!