README.md — RCRE (Reversible Collapse-Resistant Encryption)
RCRE is a novel experimental cryptographic primitive inspired by the Reversibility Kernel (RK) theory of quantum collapse.
Instead of relying purely on computational hardness, RCRE encodes messages into thermodynamically modeled coherence structures —
where incorrect decryption attempts cause entropy buildup, ultimately triggering irreversible collapse.
"Persistence attracts entropy — and collapse is not failure, but the final whisper of structure lost."
- Mutual information decay modeled with a Persistence Equation
- Structural collapse if entropy exceeds a threshold
- XOR-based reversible encoding for testbed simplicity
- Simulated entropy injection with every "probe"
- Prints real-time
S(η)values with each attempt - Reversible unless you push the entropy too far — then it's gone forever
- Rust (latest stable): https://rust-lang.org/tools/install
bash
cargo build --release
🚀 Run
cargo run
use
rcre_crypto.exe --encrypt <input.txt> <output.enc> --key <secret>
rcre_crypto.exe --decrypt <input.enc> <output.txt> --key <secret>
e.g.:
rcre_crypto.exe --encrypt D:/test/data/test.txt D:/test/data/test.enc --key ultra_secret
rcre_crypto.exe --decrypt D:/test/data/test.enc D:/test/data/test.dec --key ultra_secret
🧪 Example Output
Encrypted message: [38, 1, 24, 30, ...]
Attempt 1 — Persistence S(η) = 1.0000, Collapsed = false
Decrypted: Collapse-resistant crypto is cool!
...
Attempt 10 — Persistence S(η) = 0.3043, Collapsed = false
Decrypted: Collapse-resistant crypto is cool!```
Once the persistence drops below ENTROPY_THRESHOLD, the RK structure collapses, and further decryption will fail irreversibly.
🧮 Core Equations
The model uses the Persistence Equation:
S(η) = exp[ -α ⋅ (1 - η) ⋅ Q / T ]
Where:
η = mutual information (1.0 → 0.0)
Q = cumulative entropy injected by adversary/decryption attempts
T = thermodynamic buffering capacity (resilience)
α = structural fragility constant
Collapse is triggered when:
S(η) < ENTROPY_THRESHOLD
🧱 File Structure
quantum_encryption/
├── Cargo.toml
├── src/
│ └── main.rs # Core logic and RK simulation
└── README.md # You're reading it
🚧 Roadmap
Key rotation entropy modeling
Spiral tip entropy gradient simulation
Binary blob encoder + streaming RK packet mode
Real-time noise entropy injection (audio/video based)
WASM & embedded support
Quantum attack modeling with Q > T scenarios
🧠 Credits
Based on the Reversibility Kernel thermodynamic collapse model by Bill Giannakopoulos, adapted into crypto by fren + ChatGPT.
🧬 License
Hybrid MIT & CC0 License — because entropy should be free.
---
