encrypt an Matlab application standalone ?

11 次查看(过去 30 天)
Hi,
We are aiming at sharing an application to partners without allowing them to get access to the source code
Therefor, Is it possible to protect (encrypt) an executable file from Matlab (.exe) ?
In particular, can we trust in p-code or standalone executable ?
Or do we need more advanced coding tools or crypting workflow ?
Thanks

回答(3 个)

Steven Lord
Steven Lord 2020-7-22
From the documentation for MATLAB Compiler: "All MATLAB files in the deployable archive are encrypted using the Advanced Encryption Standard (AES) cryptosystem."
  2 个评论
Benoit MAGUET
Benoit MAGUET 2020-7-23
Hi Steven,
Thank you for your quick response.
I would like to have confirmation that a Standalone App is indeed a deployable archive.
And also how one coul encrypt or hide the hierachy of the archive.
Because once transformed into Standalone app, we can extract the archive, the files seem well encrypted but we can even the entire hierarchy of the app.
David Leffingwell
David Leffingwell 2023-6-12
编辑:David Leffingwell 2023-6-12
In R2021b or later you can use the -s option of the MATLAB Compiler to obfuscate the file and folder structure in the Standalone application. Also, in R2022b or later, you can use the -j option of the MATLAB Compiler to automatically P-Code all your M files with a newer version of P-Code.
See here for more details.

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2020-7-23
In particular, can we trust in p-code or standalone executable ?
You should definitely not trust in p-code. It obscures, but there are debugging techniques that can examine parts of it. It is expected that someone might have largely decoded it by now.
Last year, someone made the claim that they had the AES key needed to decrypt .exe files. I do not know if the claim was accurate, but I would not rule out the possibility that someone dug through the executable enough to figure it out.
The role of good encryption and obfuscation is to make it more expensive to decode the files than the value gained. You should never ever count on software encryption to make it impossible for code to be examined.
The military works with hardened hardware with sealed chips designed to make it near impossible to get at the components (and bus lines) without breaking the device beyond use. Even then, for the class of devices that needs that kind of protection, they use carefully designed software and hardware to avoid "back channels" (e.g., giving away whether an operation succeded or not by monitoring timing differences.)

David Leffingwell
David Leffingwell 2023-6-12
The MATLAB Compiler can be used to create an encrypted Standalone application.
In R2021b or later you can use the -s option of the MATLAB Compiler to obfuscate the file and folder structure in the Standalone application. Also, in R2022b or later, you can use the -j option of the MATLAB Compiler to automatically P-Code all your M files with a newer version of P-Code.
See here for more details.

类别

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

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by