-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
97 lines (68 loc) · 2.97 KB
/
README
File metadata and controls
97 lines (68 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
README.md — RCRE (Reversible Collapse-Resistant Encryption)
# 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."
---
## 🔥 Features
- 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**
---
## 🛠️ Build Instructions
### ⚙️ Prerequisites
- Rust (latest stable): [https://rust-lang.org/tools/install](https://rust-lang.org/tools/install)
### 🧱 Compile
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.:
# Encrypt
rcre_crypto.exe --encrypt D:/test/data/test.txt D:/test/data/test.enc --key ultra_secret
# Decrypt
rcre_crypto.exe --decrypt D:/test/data/test.enc D:/test/data/test.dec --key ultra_secret
🧪 Example Output
```Original message: "Collapse-resistant crypto is cool!"
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.
---