Array Index Obfuscation via Modular Encoding

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
ImprovesecurityVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvedifficulty of reverse engineeringVSAvoidsystem complexity
Core Design Contradiction:
Difficulty of detecting and measuringVSDevice complexity

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #35Parameter changes

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

Engineering Contradiction:
Improveobservability of secret valuesVSAvoidcomputational complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP3125144B1Array indexing with modular encoded values
Publication Date: 2019.11.13 NXP BV
  • EP3125144B1 patent drawingFigure 1
  • EP3125144B1 patent drawingFigure 2
  • EP3125144B1 patent drawingFigure 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.