Executable Image Encryption via Post-Linker Fix-Up Table Protection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for encrypting and executing executable images result in slower processing speeds due to the separate processes of decrypting and relocating the executable code, which consume valuable processor cycles and lead to less responsive systems, especially in MMU-less embedded systems.
Innovation Solution
A method and system that combines the decryption and fix-up processing of the relocation fix-up patch table with the encryption of sections marked for protection, allowing for efficient encryption and execution of executable images by flagging sections to be encrypted during compilation and linking, and using a post-linker encryption engine to encrypt the relocation fix-up patch table and sections, enabling decryption and relocation at load time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If executable code is encrypted prior to execution, then software protection from unauthorized copying is improved, but processing speed deteriorates due to decryption consuming valuable processor cycles
Solution Approach 1:
The patent applies preliminary action by pre-encrypting only the fix-up table data during the linking stage, rather than encrypting the entire executable at runtime. This allows the decryption to be performed quickly and efficiently when needed, while the protection is already in place. The encryption is done in advance during compilation/linking, so the runtime overhead is minimized to only decrypting the fix-up table rather than the entire program.
2Reliability
If decryption and relocation are performed as separate operations, then the executable image can be properly loaded and executed, but the loading time increases consuming valuable processor cycles
Solution Approach 1:
The patent merges the decryption and relocation operations into a single integrated process. The fix-up table is decrypted in-place at its original location in the executable image, and then the same decrypted data is immediately used for relocation operations. This eliminates the need to decrypt the entire executable, copy it to memory, and then perform relocation separately. The fix-up table decryption and relocation happen together, significantly reducing loading time.
3Ease of operation
If the entire executable image is decrypted before execution, then all code sections can be executed, but processor cycles are wasted decrypting code that does not require protection
Solution Approach 1:
The patent applies local quality by selectively encrypting only the fix-up table data that requires protection, rather than encrypting the entire executable image. Different parts of the executable have different properties: the fix-up table contains relocation information that needs protection and decryption, while the rest of the executable code can remain in its original form. This localized approach ensures that only the necessary portions are decrypted, maximizing processor efficiency while maintaining execution capability.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
The invention provides for a method of encrypting and executing an executable image, comprising; flagging sections of the executable image to be encrypted using commands in source files and compiling said executable images so as to generate object files, linking one or more of said executable images using a linker to produce a final executable image, passing said linked executable images to a post-linker encryption engine to encrypt a relocation fix-up patch table and sections of executable images flagged for encryption, and at load time decrypting relocating and executing the executable images.