Array Index Obfuscation via Modular Encoding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software applications face challenges in protecting against reverse engineering, as attackers can use tools to analyze and understand the code, especially when computations are performed on encoded values that need to be decoded and re-encoded, potentially revealing plain values.
Innovation Solution
The method involves using split variable expressions to obscure software code by permutating data arrays and encoding operations, ensuring that secret values are not observable, and applying these techniques to modular exponentiation and elliptic curve cryptography functions to create a white-box implementation that hides index values and cryptographic operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If code obfuscation is applied to hide software logic and prevent reverse engineering, then security against attackers is improved, but the complexity of the code increases and may affect ease of operation
Solution Approach 1:
The code is segmented into multiple representation forms (original code, permutation code, encoded code) that can be selectively applied to different parts of the software. This allows targeted obfuscation of critical sections while maintaining readability in other areas, resolving the contradiction between security and complexity.
Solution Approach 2:
An intermediary representation layer is introduced between the original code and its execution. This intermediary form uses permutation functions and encoded indices that obscure the original logic while maintaining functional equivalence, thereby improving security without proportionally increasing operational complexity.
2Difficulty of detecting and measuring
If permutation functions and encoded indices are used to obscure data arrays, then the difficulty for attackers to understand program execution increases, but the device complexity increases
Solution Approach 1:
Permutation functions and encoding schemes are pre-computed and embedded into the code structure during compilation or initialization. This preliminary action ensures that the obfuscation is already in place before execution, increasing reverse engineering difficulty without adding runtime complexity to the system.
Solution Approach 2:
The indices and data array parameters are transformed using mathematical encoding functions that change their representation form. These parameter changes obscure the original data relationships while maintaining computational correctness, thereby increasing attack difficulty without significantly increasing system complexity.
3Loss of information
If split variable expressions are used to encode indices, then secret values become unobservable to attackers, but the computational operations become more complex
Solution Approach 1:
Indices are segmented into multiple components using split variable expressions, where each component represents a portion of the original index value. This segmentation ensures that no single observable value reveals the complete secret index, while the computational overhead is distributed across multiple simple operations rather than one complex operation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A method of obscuring software code including a data array and a plurality of operations, including: identifying, by a processor, a data array with an index to be obscured and an operation using the data array; permutating the identified data array using a permutating function; and replacing the identified operation using the permutated data array and equivalent encoded permutation function.