Secure Code Execution via Indirect Addressing and Jump Tables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software compiled into executable code is vulnerable to tampering, such as unauthorized patch code insertion and snooping for vulnerabilities, with encryption and decryption methods often resulting in performance reduction.
Innovation Solution
Implementing operand indirect addressing and a non-typical instruction fetch mechanism using jump tables to secure software code execution, where each instruction includes an index to an operand table, and the code is scrambled for execution, making it resistant to tampering without the indirect and jump tables.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If encryption and decryption are used during code execution to protect software, then security against tampering is improved, but execution performance deteriorates significantly
Solution Approach 1:
The code is scrambled in advance before execution using a deterministic algorithm and stored in scrambled form. During execution, the same scrambling algorithm is applied to restore the code to its original state, enabling fast execution without real-time decryption overhead. This preliminary preparation eliminates performance penalties during runtime.
Solution Approach 2:
A jump table serves as an intermediary layer between the scrambled code and the execution engine. The jump table contains the correct sequential instruction pointers that redirect execution flow to maintain proper program logic despite the scrambled code layout, allowing the processor to execute scrambled code directly without performance loss.
2Reliability
If code is scrambled using jump tables and indirect addressing, then resistance to unauthorized patching and snooping is improved, but code complexity increases
Solution Approach 1:
The code is transformed by applying a scrambling algorithm that changes the layout and positioning of instructions while maintaining their functional relationships. This parameter change in code organization provides tamper resistance because any modification to the scrambled code renders it meaningless without the corresponding jump table, while the deterministic nature of the scrambling keeps the transformation manageable.
Solution Approach 2:
The code protection mechanism is segmented into separate components: the scrambled code segment and the jump table segment. This segmentation allows the main code to remain compact and execution-efficient while the jump table handles the complexity of restoring instruction sequences, distributing the structural complexity across different parts of the system.
3Reliability
If operand indirect addressing is implemented for each instruction, then security against code snooping is improved, but instruction processing complexity increases
Solution Approach 1:
The scrambled code structure is designed to be self-describing, where the code itself contains the necessary information (through indirect addressing operands) to locate and execute the correct next instructions. The jump table acts as a self-service mechanism that automatically resolves instruction sequences without requiring external intervention or complex processing logic during execution.
Data Source
AI summary
Methods, program product, and systems for providing tamper-resistant executable software code are provided to enable software code transport, storage, and execution security by formatting all instructions to use operand indirect addressing, resulting in an indirect table for each operand position, or field, in the instruction set. That is, rather than each instruction including an operand, each instruction includes an index to the location of the value of the operand in an indirect table. The methods, program product, and systems can also implement a non-typical instruction fetch associated with a program counter and a sequentially stored vector table, or jump table, to retrieve the next sequential instruction (“NSI”). Following rearranging or scrambling or encoding of the executable code, the code can be loaded and executed directly in scrambled form using the jump table, but cannot be meaningfully disassembled, nor executed properly, without the jump table to resolve the NSI.


