Arithmetic Obfuscation
Protection ID: arithmetic_obfuscation
Arithmetic Obfuscation transforms simple arithmetic operations into complex equivalent expressions that produce the same result. This makes it significantly harder to understand what computations the code is performing.
Configuration
{
"protections": {
"arithmetic_obfuscation": "medium"
}
}{
"protections": {
"arithmetic_obfuscation": "medium"
}
}Available levels: "simple", "medium", "complex".
How It Works
Arithmetic operations in compiled code are straightforward to understand. An addition, subtraction, or comparison compiles to recognizable instructions that an analyst can immediately interpret.
Arithmetic Obfuscation replaces these simple operations with mathematically equivalent expressions that are far more complex. The computation produces exactly the same result, but the relationship to the original operation is obscured. An analyst must solve the mathematical equivalence to understand what the code actually computes.
This is particularly effective for protecting calculations related to pricing, licensing, scoring, encryption keys, or any numerical logic that reveals business rules.
Intensity Levels
| Level | Description |
|---|---|
simple | Basic expression expansion with minimal overhead |
medium | More elaborate transformations that resist manual simplification |
complex | Highly intricate expressions requiring advanced mathematical analysis to simplify |
When to Use
Arithmetic Obfuscation is recommended for applications containing pricing calculations, license validation, scoring algorithms, or any code where understanding the numerical operations would reveal business logic. It is most effective when combined with Instruction Substitution for comprehensive expression-level protection.
Related
- Instruction Substitution - Replace instruction patterns
- Control Flow Obfuscation - Restructure method logic
- Protections Overview - All available protections