Skip to content
whisprer edited this page Sep 7, 2025 · 1 revision

Welcome to the Cellular_Automata_Based_Cryptanalysis wiki! Cellular Automata-based Cryptanalysis (CACA) Wiki Project History Started as a weekend project out of boredom, CACA evolved into a C++ library for analyzing encrypted files without decryption. Inspired by image denoising research (e.g., Suresh et al., 2018), it uses cellular automata (CA) to detect patterns and vulnerabilities, targeting security auditing, forensics, and education. Future Goals

Implement SIMD optimizations for faster CA processing. Enhance CA denoising algorithms. Develop visualizations (histograms, heatmaps) for test results. Integrate NIST Statistical Test Suite for validation. Explore GPU acceleration and ML-based pattern recognition.

Installation g++ -std=c++17 -O3 -march=native -o caca caca_main.cpp -lm -pthread

Optimized with OpenMP: g++ -std=c++17 -O3 -march=native -fopenmp -o caca_fast caca_optimized.cpp -lm -pthread

Max performance (AVX2): g++ -std=c++17 -O3 -march=native -mavx2 -mfma -fopenmp -funroll-loops -o caca_fast caca_optimized.cpp -lm -pthread

Windows (MinGW): g++ -std=c++17 -O3 -march=native -o caca.exe caca_main.cpp -lm -pthread

Usage Basic analysis: ./caca -f encrypted_file.bin -i 5

Options:

-f, --file : Input file. -a, --ascii: Treat as ASCII. -o, --output : Output prefix. -i, --iterations : CA iterations (default: 5). -t, --threads : Thread count (0=auto). -r, --ca-rules <r1,r2>: CA rules (e.g., 30,110,150). -v, --verbose: Performance metrics. -h, --help: Show help.

Examples: ./caca -f encrypted.bin ./caca_fast -f large_encrypted.bin -t 8 -v

Compilation See installation commands. Use -mavx2 for SIMD support. How It Works CACA applies CA rules (e.g., 30, 82, 110, 150) to ciphertext, iterating to reveal patterns. It uses:

Math: Entropy (H = -Σp*log₂p), Index of Coincidence (IC), Chi-Square tests. Science: CA evolves states based on neighbor rules, detecting non-randomness in encrypted data. Process: Loads binary data, processes with multi-threaded CA, analyzes with statistical metrics.

Cellular Automata Basics CA are grids of cells with states (0/1) updated by rules (e.g., Rule 30: chaotic pattern generation). In CACA, byte-level CA grids detect encryption flaws over iterations. Additional Info

Test Data: Use synthetic (repeated 0xFF, XOR), real-world (logs, images), and flawed (reused IVs) datasets. NIST Standards: Refer to NIST IR 8446 ipd and SP 800-90 for randomness benchmarks. Ethics: Open-source under MIT License, designed for security auditing, not illegal use.

Clone this wiki locally