To top
Resources Resources

Categories: Protection

Protecting Standalone MATLAB Applications

Engineers, scientists, economists, and the mathematically inclined everywhere swear by it: MATLAB by Mathworks Inc., the numeric computing solution of choice for millions of users. Born as a research project in the 1960s, MATLAB, short for MATrix LABoratory, soon developed into a firm favorite among science and engineering students and was eventually commercialized in the mid-1980s. Even after decades in the field, MATLAB remains the go-to solution for numeric calculation purposes like those common in scientific computation, which can, by their nature, become unwieldy for the symbolic computation of regular computer algebra. Many of the algorithms used by professionals in many industries, from aeronautical engineers to stock market whiz-kids, are made possible by MATLAB.

It’s a MATLAB World

From its humble beginnings, MATLAB has evolved into a wide array of tools built around its unique programming language and libraries. Its toolbox has grown to cover a fast range of applications, from financial mathematics to rocket science, and the versatility of its proprietary programming language means that there is virtually no limit to the mathematical operations and use cases that can be realized with MATLAB. With the ability to turn these into standalone applications with MATLAB Compiler, MATLAB is an expression par excellence of how intellectual property is born: A smart developer tackles a numerical computation or other data manipulation problem, invents a solution for it with MATLAB, and turns it into a ready-made application that can be sold to people who may not have the same mathematical programming expertise. Especially with MATLAB’s cult following among STEM students and researchers, this makes for a great opportunity for enterprising engineering talent. The growing presence of AI and machine learning on its home-turf disciplines like financial mathematics has only reinforced MATLAB’s prominence in the field.

But every opportunity will attract unwanted attention, and MATLAB tools and applications are no exception. IP theft and the threat of manipulation are constant concerns, especially as the stakes are particularly high here. Invaluable and exceedingly expensive intellectual resources are invested in most applied MATLAB technology and may be at risk of theft. Even worse, potentially incalculable financial or material damage is likely if an attacker managed to sabotage the mathematical software that makes algorithmic trading, space flight, or power grid management possible.

This is the essence of CodeMeter’s mission: To protect not just what is dear to us, but also what lets us excel, as professionals, companies, or entire communities. With Wibu-Systems’ IT security, protection, and licensing expertise and just a few tiny tweaks to the regular CodeMeter workflow, it becomes easy to secure standalone applications made with MATLAB compiler and monetize them with the full power and comfort of CodeMeter.

A Case Study in Simplicity: Protecting MATLAB Applications

Applying CodeMeter protections to a MATLAB standalone application could not be simpler: All that is needed is a version of AxProtector, a Firm Code, a Product Code, and just a few minutes of the developer’s time. The Firm Code is a seven-figure code assigned by Wibu-Systems to a user of AxProtector along with the developer’s master dongle, the Firm Security Box. It is needed to create unique licenses with CodeMeter. Whether it is older Firm Codes issued specifically for use with hardware CmDongles or software CmActLicenses, with numbers of 100,000 and higher, or the new Universal Firm Code for all types of license containers, starting at 6,000,000, every Firm Code is fit for purpose for protecting and preparing the licensing for MATLAB standalone applications.

The Product Code is chosen by the developer for each item to be protected, using a simple integer format. This can be entire applications or individual functions and features. With the Firm Security Box capable of handling 4 billion options, this leaves enough freedom to organize the portfolio of protected and licensed applications on offer to match virtually any business model.

To encrypt the application in practice, AxProtector first asks for the source file and a destination for the protected file. The magic happens with the next important entry in the Licensing Systems tab: Among other licensing options, the developer’s Firm Code and a Product Code are entered here. Together, they are used to create the cryptographic underpinnings of the MATLAB application’s license.

As a final step in the CodeMeter protection process, dynamic code modification, which normally modifies the source code of the protected application during runtime, needs to be switched off for the system to work with MATLAB: Since this is not compatible with MATLAB Compiler, the option needs to be unchecked in the Security options tab. Once the application is protected, it is impossible to run it without the right license, using the same Product Code as the one used during protection.

CodeMeter has many more tricks and capabilities up its sleeve that give the developer free rein to design the protection and licensing for every business model or use case. But the simple steps laid out here are more than enough to protect any MATLAB standalone application with unbeaten encryptions and be ready to create licenses and distribute the application with confidence.

And CodeMeter makes the developer’s life even easier with its excellent automation and integration capabilities. The license creation and management process can be facilitated with many self-service options or integration with existing CRM and e-commerce systems. This leaves enough choice for MATLAB applications of every type and scale, from highly specialized solutions for a limited user group that need strong protection for the sophisticated IP that went into them to commercial applications for engineering clients that are sold through regular large-scale software distribution systems.

Made for Each Other and Made to Work

CodeMeter and MATLAB make for a perfect pairing and proof that protection, licensing, and monetization do not have to be complicated, even when the most intricate mathematical solutions are protected with the toughest and most sophisticated encryption technology. Just add AxProtector encryption and CodeMeter licensing, and any MATLAB application can be safe from hackers and thieves, be it in an engineering lab, on Wall Street, or on its way to the Moon.


KEYnote 43 – Edition Spring/Summer 2022