Compiler Encrypts Machine Code via Register State
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing compiler systems for micro-controllers and processing units lack effective protection against unauthorized access and copying, as they do not adequately secure the machine language code, which can be exploited by attackers.
Innovation Solution
A compiler system that encrypts source code into machine language code using an encryption function dependent on the internal register state of the processing unit, with additional encryption and decryption mechanisms to enhance security, including memory encryption and decryption units, and error detection mechanisms to verify code integrity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If source code is compiled into plain machine language code, then the code is easily executable and debuggable, but it becomes vulnerable to unauthorized access and copying
Solution Approach 1:
The patent applies preliminary action by encrypting the machine language code during the compilation process itself, before the code is stored or executed. The compiler transforms the generated machine language code through encryption using a cryptographic module, so that the code is already protected when it is written to memory or storage, preventing unauthorized access from the outset
Solution Approach 2:
The patent introduces an intermediary cryptographic module that acts as a mediator between the code generation process and the final executable code. This module encrypts the machine language code using cryptographic algorithms, creating an intermediate encrypted representation that requires decryption before execution, thus adding a security layer without fundamentally changing the execution model
2Reliability
If encryption is applied to machine language code, then unauthorized access is prevented, but the code execution process becomes more complex
Solution Approach 1:
The patent implements self-service by having the processing unit perform self-decryption of the encrypted machine language code during the execution process. The cryptographic module within the processing unit automatically decrypts the code as it is fetched from memory, so that the complexity of decryption is handled transparently by the system itself rather than requiring external intervention or complex user操作流程
Solution Approach 2:
The patent merges the cryptographic functionality directly into the processing unit by integrating a cryptographic module with the code execution architecture. This consolidation allows the decryption and execution processes to be tightly coupled, enabling the processing unit to handle encrypted code natively without requiring separate decryption hardware or software layers that would increase operational complexity
3Reliability
If strong encryption functions are used, then security against copying is enhanced, but the compilation and execution time increases
Solution Approach 1:
The patent applies preliminary action by performing the encryption operation during the compilation phase rather than during execution or storage. The cryptographic module encrypts the machine language code as it is generated by the compiler, so that the encryption overhead is incurred once during compilation rather than repeatedly during execution, minimizing the impact on overall system productivity
Solution Approach 2:
The patent employs parameter changes by allowing the selection of different cryptographic algorithms and key lengths based on the specific security requirements and performance constraints of the application. The compilation system can adjust encryption parameters such as algorithm complexity and key size to balance security strength against compilation time, enabling optimization for different use cases
Data Source
AI summary
A compiler system including a compiler configured to compile a source code into a machine language code is presented, so that the machine language code is executable on a processing unit, wherein the processing unit comprises an internal register that is changing its state responsive to an execution of the machine language code. The compiler is configured to encrypt the machine language code based on an encryption function that depends on the state of the internal register.


