This project implements a highly obfuscated password verification system written in C++. Instead of performing a direct string comparison, the program converts user input into a bit-level representation and evaluates it through a large combinational logic circuit.
The system mimics a hardware-style verification process using boolean logic gates (AND, OR, NOT, etc.), making it intentionally difficult to reverse engineer or analyze through traditional static methods.
- The user is prompted to enter a password.
- The input string is converted into a fixed-size boolean array of 128 bits (
PWDSIZEBITS).
- Each character is converted into its 8-bit ASCII representation.
- These bits are stored sequentially in a boolean array.
- The function
runprogram1simulates a large logic circuit. - Each input bit is assigned to a variable (
v0throughv127). - A long chain of logic operations (primarily
ANDandNOT) evaluates whether the input matches a hidden condition.
- If the final boolean output is
true, access is granted. - If
false, access is denied.
- Upon successful authentication:
- A hidden byte array (
secret) is XORed with the input password. - The result is printed as the final output (likely a flag or decrypted message).
- A hidden byte array (
-
Bit-Level Verification
Passwords are validated at the binary level rather than as strings. -
Obfuscation by Design
The logic circuit is intentionally long and difficult to follow, making reverse engineering non-trivial. -
Deterministic Logic Chain
The final result depends on a strict sequence of boolean conditions—all must evaluate to true. -
XOR-Based Secret Reveal
The output is dynamically decrypted using the correct password.
- securelogin.cpp # Contains all logic, including input handling and verification
Converts a single character into an array of 8 boolean values representing its binary form.
Converts a full string into a boolean bit vector.
Core verification function that evaluates the input bits through a large boolean logic circuit.
g++ -o secure_login securelogin.cpp- SciTePress (2021). Conference Paper.
https://www.scitepress.org/Papers/2021/105575/105575.pdf