Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Secure Login System (Logic-Gate Password Verifier)

Overview

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.


How It Works

1. Input Handling

  • The user is prompted to enter a password.
  • The input string is converted into a fixed-size boolean array of 128 bits (PWDSIZEBITS).

2. ASCII to Bit Conversion

  • Each character is converted into its 8-bit ASCII representation.
  • These bits are stored sequentially in a boolean array.

3. Logic Circuit Evaluation

  • The function runprogram1 simulates a large logic circuit.
  • Each input bit is assigned to a variable (v0 through v127).
  • A long chain of logic operations (primarily AND and NOT) evaluates whether the input matches a hidden condition.

4. Authentication Result

  • If the final boolean output is true, access is granted.
  • If false, access is denied.

5. Secret Output

  • 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).

Key Characteristics

  • 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.


File Structure

  • securelogin.cpp # Contains all logic, including input handling and verification

Functions

convertAsciiToBool(char inputchar)

Converts a single character into an array of 8 boolean values representing its binary form.

convertString(char *str, bool inputAsBooleanVector[], int arraysize)

Converts a full string into a boolean bit vector.

runprogram1(bool input[], bool output[])

Core verification function that evaluates the input bits through a large boolean logic circuit.


Compile

g++ -o secure_login securelogin.cpp

References

About

A crackme I have developed in C++ utilizing a novel technique called Software-based Hardware Abstraction, and a xor decoding algorithm.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages