Number Encryption
The number encryption transformer encrypts any integer-based numeral to be hidden. This is perfect for uglifying the code in general and making it more of a hardship for reverse-engineers to obtain a clean source code. This furthermore reinforces any boolean-based conditionals.
The number encryption relies on the GEN3 flow obfuscation and may, in decompiled output, show as follows
Lets assume the following scenario:
- is the number we wish to encrypt
- is the "seed" of the block
- is the encryped number
According to simple xor mechanics:
So, by definition, if is our seed, at runtime we must compute such as . Then, we must modify the bytecode instruction such as:
int value = x;
becomes
int value = d ^ n;
Where is the value computed ahead of time in the form of a constant and the opaque predicate. Eg:
int value = 5;
becomes
int predicate = 0x100;
int value = 105 ^ predicate;
Config
Currently, there is only one mode of Number Encryption, STANDARD
numberEncryption {
enabled: true
exempt: []
}
Examples
Unobfuscated
int var = 1000;
System.out.println(var + 1 + 2 + 3);
Obfuscated
int var = 0xA0290233 ^ n;
System.out.println(var + 0x92083838 ^ n + 0x92083839 ^ n + 0x92083840 ^ n);