Categories: Protection
Automatic Function Encryption Without Source Code Changes
Functions that require particularly strong protection should ideally be present in memory as plaintext only while they are being executed. Until now, AxProtector variants for native applications offered this capability only through selective encryption of individual methods, which required source code changes. With the new NC technology, this technique, previously known as IxProtector, is now available for Windows and Linux binaries without modifying the source code. Automatic Function Re-encryption also makes it possible to automatically re-encrypt selected functions after execution.
What Is NC?
With the release of CodeMeter Protection Suite 11.80, AxProtector Windows and Linux adopted Native Core (NC) technology, joining AxProtector .NET, Python, and JavaScript. Only the metadata required for execution (the “Security Payload”) is now embedded in the program to be protected. The actual licensing and protection logic resides in the separate CodeMeter Protection Suite Runtime (CPSRT), rather than in an AxEngine injected into the protected application, as was previously the case. This allows multiple protected modules within a single process to use the same protection engine, saving space and improving performance. CPSRT itself is strongly protected and hardened against reverse engineering attacks.
Because the protection logic now resides in a separate component, Wibu-Systems can provide software updates without forcing the software vendor to re-encrypt the protected application. The protection component can therefore be updated independently of the protected program. This supports vendors in maintaining their products over time and is also beneficial in the context of regulatory requirements, such as those imposed by the Cyber Resilience Act.
Setting Up Protection
For encryption, AxProtector Windows and AxProtector Linux require the binary to be protected, its symbols, and the protection definition in WibuCpsConf. For Windows programs, symbols are typically stored in PDB (Program Database) files, which the compiler and linker generate during the build process. For Linux programs, they are usually embedded directly in the binary as DWARF (Debugging With Arbitrary Record Formats) information. These symbols allow AxProtector to analyze the application more effectively and provide function encryption options. Protection is configured in WibuCpsConf, where licenses, options to prevent reverse engineering, and mappings of functions, classes, or namespaces to licenses can be defined. Based on this configuration, AxProtector with NC technology protects the unprotected binary using modern cryptographic methods and, where required, establishes a strong binding to a license, as shown in Figure 1.
Encrypting the Entire Module
AxProtector with NC technology uses the symmetric cryptographic primitive AES-256 to securely encrypt code and data. Its key length provides a substantial security margin, even when known quantum attack methods are considered. However, data protected in this way remains secure only until the CPU needs it for execution. The fundamental distinction here is between protecting code and data “at rest” and “in use.” “At rest” refers to a program stored on disk that is not being executed. “In use,” by contrast, refers to a program that has been loaded into memory and is actively being used. The new NC technology integrates multiple layers of protection to secure code and different types of data against a range of attacks.
Module Encryption provides an outer layer of protection for the code and all payload data in a program. Entire code and data sections are encrypted, effectively protecting them against static analysis at rest. This protection is particularly powerful when combined with a base license, since decryption is possible only when that license is present. When a program bound to a license is loaded, the license is checked first; if the check succeeds, the sections are decrypted, using a key inside the license. Figure 2 illustrates how the state of the module changes in memory over time during execution. Initially, all code is encrypted; after loading, the functions shown in turquoise are present in memory as plaintext. This allows the program to achieve maximum performance, since no further decryption is required at runtime. The drawback, however, is that an attacker can extract all functions directly from memory and obtain all the information through a memory dump at any point after startup.
Encrypting Individual Functions
Encrypting the entire module protects the code at rest. AxProtector also provides a simple way to protect individual functions so that they are decrypted only when first used (“on demand”). Previously, this method required source code changes using WUPI (Wibu Universal Protection Interface). AxProtector uses symbol information to integrate protection into the already compiled binary. As with .NET and Python, this can be configured with a few clicks in AxProtector GUI NC or configured individually in WibuCpsConf. Different licenses can be assigned to functions, as with the established IxProtector technology. When base licensing is used, eligible functions are automatically protected with on-demand encryption by default. The entire program is also secured through Module Encryption. Figure 3 shows how the state of the protected program changes over time.
Before loading, the program is secured by Module Encryption. Once it has been loaded into memory and decrypted, only individual functions become available. Functions that have not yet been executed remain protected (orange) thanks to on-demand decryption. Functions that have already been executed are decrypted (turquoise) and present as plaintext. Even when decrypted, certain functions contain validation logic that prevents unauthorized execution if the required license is missing. For functions called particularly frequently during program execution, automatic optimization reduces the number of license checks. This improves runtime performance while maintaining a good balance between security and performance.
With automatic decryption, more and more functions are decrypted as program execution progresses, leaving them in memory as plaintext. In complex programs, users rarely use 10-20% of the functionality. Even automatic testing typically reaches 50-90% of the code. A memory dump therefore does not automatically give an attacker access to every function in a program. Dedicated traps can also be added to counter automated attacks aimed at fully decrypting all functions at the binary level.
This provides two layers of protection that build on each other: Module Encryption protects code and data sections before the program is executed. Function Encryption decrypts individual functions only when they are first used.
Temporary Decryption for Stronger Protection
To make the execution of protected programs even more secure, AxProtector incorporates a new technique for automatically re-encrypting functions. The corresponding code is present in memory as plaintext only while the function is executing and is re-encrypted immediately when the function exits. This minimizes the time a function remains in plaintext, leaving it unprotected only while it is actually in use. Automatic Function Re-encryption can be enabled selectively for individual functions, although the added security comes at the cost of reduced performance for those functions. This is particularly noticeable when a protected function is executed in a loop. To improve performance, optional caching can be enabled so that re-encryption takes place after a few seconds rather than immediately. Repeated calls within this window therefore incur significantly less overhead. Nested and concurrent calls are accounted for in both cases. Automatic Function Re-encryption is particularly suitable for functions containing valuable intellectual property, such as proprietary algorithms, calculation methods, or security-critical validation logic. For performance-critical functions called very frequently, caching can be applied selectively, or automatic re-encryption can be disabled.
Figure 4 shows the effects of Automatic Function Re-encryption on the program. The transition from State 2 to State 3 is particularly revealing. A comparison with Figure 3 shows that previously decrypted functions are now encrypted again. Only one function remains in plaintext in both states, because it calls the other functions in sequence. An attacker therefore needs to know when specific functions are exposed in memory, making the attack even more difficult.
WUPI
With automatic function encryption, if the license required to call a protected function is missing, CPSRT displays an appropriate message by default. General error behavior can be customized through CpsEvents. However, programmatic control cannot be returned to the original program in this case. The additional licensing error was not anticipated in the original program, and automatic function encryption cannot add a corresponding return path to the source code. WUPI remains available for greater control and dedicated error handling. It allows licenses to be checked before a protected function is called and the corresponding error scenarios to be handled at the source code level. This enables the program to respond specifically to licensing errors. Functions can also be decrypted or re-encrypted at the desired times using the appropriate commands.
Conclusion
AxProtector Windows and AxProtector Linux with the new NC technology build on the proven IxProtector technology and make it particularly easy to use. Protection is integrated into the compiled binary using existing symbol information, without requiring source code changes. Module Encryption protects the entire program at rest, while Function Encryption and Automatic Function Re-encryption provide targeted protection for particularly sensitive functions in memory as well. Selective configuration and optional caching help balance security and performance.
Function Protection at a Glance
■ NC is the new technology generation for the proven AxProtector Windows and AxProtector Linux
■ Module Encryption provides an outer layer of protection by fully encrypting eligible code and data sections
■ IxProtector technology is integrated directly into AxProtector Windows and AxProtector Linux
■ AxProtector Windows and AxProtector Linux with NC technology require symbols (PDB/DWARF) for function encryption
■ No source code changes are required to encrypt functions
■ Automatic Function Re-encryption provides temporary code decryption, with optional caching
■ Explicit decryption and re-encryption, as well as error handling, are available through WUPI
■ CPSRT serves as an external security runtime, allowing maintenance without re-encryption
KEYnote 52 - Edition Fall/Winter 2026



