-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab.html
More file actions
321 lines (282 loc) · 9.7 KB
/
Copy pathlab.html
File metadata and controls
321 lines (282 loc) · 9.7 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Rubik's Cryptography</title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600&display=swap"
rel="stylesheet">
<style>
body {
margin: 0;
background-color: #121214;
color: #e0e0e0;
font-family: 'IBM Plex Sans', sans-serif;
}
#app {
opacity: 1;
}
.lab-workspace {
background: #121214;
display: flex;
flex-direction: row;
height: calc(100vh - 60px);
/* Full height minus header */
overflow: hidden;
}
#loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #121214;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.3s ease;
}
#loading-overlay.hidden {
opacity: 0;
pointer-events: none;
}
</style>
</head>
<body>
<div id="loading-overlay">
<div style="font-family: 'IBM Plex Mono', monospace; color: #00ff88; letter-spacing: 0.2em;">INITIALIZING...</div>
</div>
<div id="app">
<header class="lab-header">
<div class="header-left">
<h1 class="logo">ENC.CUBE_SIM <span class="version">v1.2.0 CFB</span></h1>
<a href="https://www.linkedin.com/in/geervan/" target="_blank" class="credit-badge">by GEERVAN</a>
</div>
<div class="mode-selector">
<button id="tab-enc" class="mode-tab active">ENCRYPT</button>
<button id="tab-dec" class="mode-tab">DECRYPT</button>
</div>
<div class="header-right">
<button id="btn-guide" class="lore-btn" style="border-color: #a1a1aa; color: #a1a1aa;">? HELP</button>
<a href="lore.html" class="lore-btn">LORE</a>
<div class="status-indicator">
<span class="status-dot"></span> <span id="sys-status">SENDER READY</span>
</div>
<a href="chat.html" class="lore-btn" style="border-color: #00ff88; color: #00ff88;">SECURE CHAT</a>
</div>
</header>
<main class="lab-workspace">
<aside class="panel left-panel">
<div class="panel-header">
<h2>// PARAMETERS</h2>
<div class="line-deco"></div>
</div>
<div class="control-group">
<label>SHARED SECRET (KEY)</label>
<input type="text" id="secret-key" placeholder="Enter seed phrase..." spellcheck="false" autocomplete="off">
<div class="btn-row">
<button id="btn-init" class="lab-btn">INITIALIZE</button>
<button id="btn-demo" class="lab-btn" style="color: #00ff88; border-color: #00ff88;">DEMO</button>
</div>
</div>
<div class="control-group">
<label id="lbl-input">PLAINTEXT INPUT</label>
<textarea id="data-input" rows="4" placeholder="Type message to encrypt..." spellcheck="false"></textarea>
</div>
<div class="control-group">
<div class="btn-row">
<button id="btn-action" class="lab-btn primary">ENCRYPT MESSAGE</button>
</div>
<div class="control-subgroup">
<label>EXECUTION MODE</label>
<div class="step-controls">
<label class="toggle-label">
<input type="checkbox" id="mode-step"> STEP-BY-STEP
</label>
<button id="btn-step" class="lab-btn sm" disabled>NEXT OP</button>
</div>
</div>
<div class="control-subgroup">
<label>Step Speed</label>
<input type="range" id="speed-control" min="1" max="10" value="5">
</div>
</div>
</aside>
<section class="viewport" id="cube-container">
<!-- Three.js Canvas will spawn here -->
<div class="overlay-ui">
<div class="reticle reticle-tl"></div>
<div class="reticle reticle-tr"></div>
<div class="reticle reticle-bl"></div>
<div class="reticle reticle-br"></div>
</div>
</section>
<aside class="panel right-panel">
<div class="panel-header">
<h2>// SYSTEM KERNEL</h2>
<div class="line-deco"></div>
</div>
<div class="monitor-group">
<label>STATE HASH</label>
<div id="state-hash" class="readout-display">000000000000</div>
</div>
<div class="process-monitor">
<!-- Step Indicator -->
<div class="proc-step-header">
<span class="step-label">ACTIVE OPERATION</span>
<span id="step-count" class="step-value">IDLE</span>
</div>
<!-- Visual Flow -->
<div class="flow-container">
<!-- Input Card -->
<div class="flow-card">
<span class="flow-label">INPUT</span>
<div id="disp-input" class="flow-val">-</div>
<div id="disp-input-code" class="flow-sub">-</div>
</div>
<div class="flow-op">+</div>
<!-- Sensor Card -->
<div class="flow-card sensor">
<span class="flow-label">SENSOR KEY</span>
<div id="disp-sensor" class="flow-val">-</div>
<div id="disp-sensor-code" class="flow-sub">-</div>
</div>
<div class="flow-op">+</div>
<!-- RC Card -->
<div class="flow-card" style="border-color: #888;">
<span class="flow-label">STEP CONST</span>
<div id="disp-rc" class="flow-val">-</div>
<div id="disp-rc-code" class="flow-sub">-</div>
</div>
<div class="flow-op">=</div>
<!-- Output Card -->
<div class="flow-card output">
<span class="flow-label">OUTPUT</span>
<div id="disp-result" class="flow-val">-</div>
<div id="disp-result-code" class="flow-sub">-</div>
</div>
</div>
<!-- Live Formula -->
<div class="math-display">
<span class="math-label">ALGORITHM</span>
<div id="disp-math" class="math-val">WAITING FOR STREAM...</div>
</div>
</div>
<div class="control-group" style="margin-top: 20px;">
<label>OUTPUT STREAM</label>
<textarea id="data-output" rows="4" readonly placeholder="Result will appear here..."></textarea>
</div>
</aside>
</div>
</main>
</div>
</div>
<!-- Guide Overlay -->
<div id="guide-overlay" class="hidden">
<div class="guide-modal">
<div class="guide-header">
<h2>// RESEARCH_GUIDE: CUBE_CIPHER</h2>
<button id="close-guide">×</button>
</div>
<div class="guide-body">
<section>
<h3>1. THE LATTICE (KEYING)</h3>
<p>Every "Shared Secret" generates a unique 3D permutation of the cube. This is our <strong>Key Space</strong> (43 Quintillion states).</p>
</section>
<section>
<h3>2. THE SENSOR (ENTROPY)</h3>
<p>We read the value of the <strong>Front-Top-Right</strong> cubie. This single character is our <strong>Stream Key (K)</strong> for the current step.</p>
</section>
<section>
<h3>3. DYNAMIC EVOLUTION (CFB)</h3>
<p>This is a <strong>Cipher Feedback</strong> implementation. The ciphertext of the previous character determines the machine's next mechanical rotation, ensuring the same plaintext character encrypts differently every time.</p>
</section>
<section>
<h3>4. QUICK START</h3>
<p>Enter a key, type a message, and hit <strong>ENCRYPT</strong>. Use <strong>STEP-BY-STEP</strong> mode to watch the math happen in real-time on the right panel.</p>
</section>
</div>
<div class="guide-footer">
<button id="start-demo-btn" class="lab-btn primary">LOAD TECH DEMO</button>
</div>
</div>
</div>
<style>
#guide-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.85);
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(5px);
transition: opacity 0.3s;
}
#guide-overlay.hidden {
display: none;
}
.guide-modal {
background: #1a1a1e;
border: 1px solid #333;
width: 90%;
max-width: 600px;
padding: 30px;
display: flex;
flex-direction: column;
gap: 20px;
box-shadow: 0 0 50px rgba(0, 255, 136, 0.1);
}
.guide-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #333;
padding-bottom: 15px;
}
.guide-header h2 {
margin: 0;
font-family: 'IBM Plex Mono', monospace;
font-size: 1rem;
color: #00ff88;
}
#close-guide {
background: none;
border: none;
color: #8d8d99;
font-size: 2rem;
cursor: pointer;
}
.guide-body {
display: flex;
flex-direction: column;
gap: 20px;
}
.guide-body h3 {
font-size: 0.8rem;
color: #8d8d99;
margin: 0 0 5px 0;
}
.guide-body p {
font-size: 0.9rem;
line-height: 1.6;
margin: 0;
color: #ccc;
}
.guide-footer {
margin-top: 10px;
padding-top: 15px;
border-top: 1px solid #333;
}
</style>
<script type="module" src="/src/main.js"></script>
</body>
</html>