Source Code Obfuscation via SFAN Algorithm

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for protecting software from reverse engineering are inefficient due to rapid source code growth and increased computational requirements, making it difficult to maintain and rewrite the software, and white box cryptography lacks sufficient security compared to black box cryptography.

Innovation Solution

An obfuscation algorithm combining shuffling, fertilization, aggregation, and neutralization operations (SFAN) is used to transform source code into obfuscated code that is difficult to reverse engineer, maintaining the same functionality and security through a combination of modules that can be iteratively applied until a predetermined threshold is met.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If existing methods for hardening software against reverse engineering are applied, then security is improved, but source code size grows rapidly and computational requirements increase

Engineering Contradiction:
ImprovesecurityVSAvoidsource code size
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies parameter changes by transforming the source code through multiple passes of optimization, shuffling, and fertilization operations that modify code parameters (structure, ordering, content) while maintaining functionality. This resolves the contradiction by changing code parameters to achieve better security without proportional growth in code size.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The obfuscation process is segmented into distinct operations (optimization, shuffling, fertilization) that can be applied iteratively. Each segment targets specific aspects of code protection, allowing fine-grained control over the balance between security enhancement and code size management.

Inventive Principle:
Principle #1Segmentation

2Reliability

If existing hardening methods are applied, then security is improved, but maintenance and rewriting of software becomes difficult

Engineering Contradiction:
ImprovesecurityVSAvoidmaintainability
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent implements dynamic obfuscation where the code structure is transformed through shuffling and fertilization operations that create variable layouts and control flow patterns. This dynamic transformation makes reverse engineering difficult while preserving the original functionality, thus maintaining ease of operation for legitimate users while improving security.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The obfuscation operations are applied as preliminary actions during the software development lifecycle, before deployment. By pre-transforming the code through optimization and fertilization passes, the system establishes security measures in advance without compromising future maintainability, as the transformations are reversible or documented.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If white box cryptography is used, then attackers have access to internal states for analysis, but implementation flexibility is improved

Engineering Contradiction:
Improveimplementation flexibilityVSAvoidsecurity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary layer of obfuscation between the attacker and the cryptographic implementation. Through shuffling and fertilization operations, it creates intermediate representations that hide the actual cryptographic logic and internal states, thus improving security while allowing the underlying flexible implementation to remain intact.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The obfuscation applies local quality changes by selectively transforming specific portions of the code (e.g., control flow graphs, variable declarations) while leaving other parts intact. This allows the implementation to maintain flexibility in critical areas while applying enhanced security measures locally where needed, resolving the contradiction between adaptability and security.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS8661549B2Method and apparatus for obfuscating program source codes
Publication Date: 2014.02.25 APPLE INC
  • US8661549B2 patent drawing
  • US8661549B2 patent drawing
  • US8661549B2 patent drawing

AI summary

First source code of a computer program having a plurality of lines of instructions is received. An obfuscation process is performed on the first source code, including at least two of a shuffling operation, a fertilizing operation, an aggregating operation, and a neutralizing operation. Second source code is generated based on the obfuscation process, where the second source code, when executed by a processor, produces an identical result as the first source code.