-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
340 lines (320 loc) · 13.1 KB
/
index.html
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<!--
SPDX-FileCopyrightText: 2024 The Forkbomb Company
SPDX-License-Identifier: AGPL-3.0-or-later
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quantum-Safe Encryption/Decryption</title>
</head>
<body class="p-10">
<div class="flex flex-col gap-4 max-w-7xl mx-auto">
<div class="flex items-baseline gap-2">
<h1
x-data="{ version: window.version }"
class="monospace text-3xl anim-text animate-text bg-gradient-to-r from-[#ca9ee6] via-[#e5c890] ] to-[#8caaee] bg-clip-text text-transparent font-black"
>
PQSpread <span class="text-xs" x-text="version"></span>
</h1>
<span class="text-xs">
kindly by
<a
href="https://forkbomb.solutions"
class="font-bold monospace underline text-[#1C39BB] whitespace-nowrap"
>
THE FORKBOMB COMPANY
</a>
</span>
</div>
<p class="text-sm">
This html page enables quantum-safe file encryption and decryption using
the
<a
href="https://csrc.nist.gov/pubs/fips/203/final"
class="underline"
target="_blank"
>ML-KEM-512 (FIPS-203)</a
> + AES-GCM, ensuring security against quantum threats. All cryptographic
operations are powered by our custom implementation built entirely
in-house using the cutting-edge
<a
href="https://zenroom.org/"
class="underline text-[#8839ef]"
target="_blank"
>Zenroom virtual machine</a
>.
</p>
<p class="text-sm">
As one of the first to implement this advanced technology, we provide a
secure, client-side solution with no remote data storage required. Use
it online
<a
href="https://pqspread.forkbomb.eu"
class="underline text-[#8839ef]"
>
https://pqspread.forkbomb.eu</a
>
or for <strong>offline and paranoid mode</strong> download a single html
file to run on your machine from
<a
href="https://github.com/forkbombeu/pqspread"
class="underline text-[#8839ef]"
>
github.com/forkbombeu/pqspread
</a>
</p>
<span class="text-xs text-end">
made with ❤️🔥 by
<a
href="https://forkbomb.solutions"
class="font-bold monospace underline text-[#1C39BB]"
>
FORKBOMB</a
>
hackers
</span>
</div>
<pre class="hidden">
<zencode-exec id="keyring" storage="local">
Scenario qp
Given nothing
When I create the mlkem512 key
And I create the mlkem512 public key
And I create the hash of 'mlkem512 public key'
Then print 'mlkem512_public_key'
And print the 'hash' as 'base58'
And print keyring
</zencode-exec>
</pre>
<div class="max-w-7xl mx-auto">
<div class="mb-4">
<hr class="m-6" />
<p class="mb-6">
<strong>Act now!</strong>
Click Encrypt to secure and share your files, or Decrypt to restore
files sent to you—fast, secure, and
<span class="border-b-3 border-[#1C39BB]"> quantum-safe! </span>
</p>
<div
x-data="{
tab: window.location.hash ? window.location.hash.substring(1) : 'encrypt',
convert(event, field) {
const file = event.target.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = (e) => {
this[field] = e.target.result.split(',')[1];
};
reader.readAsDataURL(file);
},
getRawContent(event, field) {
const file = event.target.files[0];
if (!file) return;
const reader = new FileReader();
reader.onload = (e) => {
const arrayBuffer = e.target.result;
const rawString = new TextDecoder().decode(arrayBuffer);
this[field] = rawString;
};
reader.readAsArrayBuffer(file);
}
}"
>
<nav>
<button
href="#"
class="border px-4 py-2 focus:outline-none border-[#1C39BB]"
:class="tab === 'encrypt' ? 'bg-[#1C39BB] text-white' : ''"
@click.prevent="tab = 'encrypt'; window.location.hash = 'encrypt'; SC()"
>
Encrypt
</button>
<button
href="#"
class="border px-4 py-2 focus:outline-none border-[#1C39BB]"
:class="tab === 'decrypt' ? 'bg-[#1C39BB] text-white' : ''"
@click.prevent="tab = 'decrypt'; window.location.hash = 'decrypt'; SC()"
>
Decrypt
</button>
</nav>
<div class="grid grid-cols-1 mt-4 md:grid-cols-8 md:gap-4">
<div
x-data="{mlkem512_public_key: '', cleartext: '', encrypted: false, downloaded: false}"
x-show="tab === 'encrypt'"
class="timeline col-span-3"
>
<ol class="list-none">
<li
class="border-b border-black pb-2 whitespace-nowrap"
:class="{'completed': mlkem512_public_key !== ''}"
>
<textarea
rows="10"
class="pt-1 w-full text-xs"
placeholder="Paste recipient's public key"
@paste.prevent="mlkem512_public_key = (event.clipboardData || window.clipboardData).getData('text').trim()"
x-model="mlkem512_public_key"
></textarea>
</li>
<li
x-show="mlkem512_public_key"
class="border-b border-black pb-2 whitespace-nowrap"
:class="{'completed': cleartext !== ''}"
>
<input type="file" @change="convert($event, 'cleartext')" />
<template x-if="cleartext">
<pre x-show="false">
<zencode-exec id="secret" :d="JSON.stringify({cleartext})" :k="JSON.stringify({mlkem512_public_key})" storage="session">
Scenario qp
Scenario ecdh
Given I have a 'string' named 'cleartext'
and I have a 'mlkem512 public key'
When I create the mlkem512 kem for 'mlkem512 public key'
And I take 'mlkem512 secret' from path 'mlkem512 kem'
And I take 'mlkem512 ciphertext' from path 'mlkem512 kem'
And I rename 'mlkem512 ciphertext' to 'header'
When I encrypt the secret message 'cleartext' with 'mlkem512 secret'
Then print the 'secret message'
</zencode-exec>
</pre>
</template>
</li>
<li
class="border-b border-black pb-2 whitespace-nowrap"
:class="{'completed': downloaded}"
x-show="encrypted"
x-data="{ encrypted: SG('secret') !== null }"
x-init="window.addEventListener('storage', () => encrypted = SG('secret') !== null);
setInterval(() => encrypted = SG('secret') !== null, 500);"
>
<template x-if="encrypted">
<a
:href="Download(SG('secret'))"
:download="JSON.parse(SG('secret')).secret_message.checksum + '.pqs'"
class="border px-4 py-2 focus:outline-none border-[#1C39BB]"
@click="downloaded = true; SC();"
>
Download PQS file
</a>
</template>
</li>
<li x-show="downloaded">
<span>🎉 Download of the encrypted file (.pqs) started</span>
</li>
</ol>
</div>
<div
x-data="{secret_message: '', downloaded: false, decrypted: false }"
x-show="tab === 'decrypt'"
class="timeline col-span-3"
>
<ol class="list-none">
<li class="border-b border-black pb-2 whitespace-nowrap">
<input
type="file"
@change="getRawContent($event, 'secret_message')"
/>
</li>
<template x-if="secret_message !== ''">
<pre x-show="false">
<zencode-exec id="original_file" :d="secret_message" :k="LG('keyring')" storage="session">
Scenario qp
Scenario ecdh
Given I have a 'base64 dictionary' named 'secret message'
and I have the 'keyring'
When I take 'header' from path 'secret message'
and I take 'text' from path 'secret message'
and I rename 'text' to 'ciphertext'
When I create the mlkem512 secret from 'header'
and I decrypt the text of 'secret message' with 'mlkem512 secret'
Then print the 'text' as 'string'
</zencode-exec>
</pre>
</template>
<li
class="border-b border-black pb-2 whitespace-nowrap"
:class="{'completed': downloaded}"
x-show="decrypted"
x-data="{ decrypted: SG('original_file') !== null, of: null}"
x-init="
const updateDecrypted = () => {
if (SG('original_file')) of = JSON.parse(SG('original_file')).text;
decrypted = of !== null };
updateDecrypted();
window.addEventListener('storage', updateDecrypted);
document.addEventListener('original_file-updated', updateDecrypted);
"
>
<template x-if="decrypted">
<a
:href="Download(of, true)"
download="decrypted.file"
class="border px-4 py-2 focus:outline-none border-[#1C39BB]"
@click="downloaded = true; SC();"
>
Download decrypted file
</a>
</template>
</li>
<li x-show="downloaded">
<span>🎉 Download of the decrypted file started</span>
</li>
</ol>
</div>
<div
class="flex flex-col gap-4 col-span-5"
x-data="{ keyring: LG('keyring') }"
x-init="
keyring = LG('keyring');
const updateKeyring = () => { keyring = LG('keyring'); };
window.addEventListener('storage', updateKeyring);
document.addEventListener('keyring-updated', updateKeyring);
"
>
<template x-if="keyring !== null">
<brutalist-card
x-show="keyring"
title="Your public key"
description="share it with others to receive encrypted files"
:content="JSON.parse(keyring).mlkem512_public_key"
>
</brutalist-card>
</template>
<template x-if="keyring !== null">
<button
class="border px-4 py-2 focus:outline-none border-[#1C39BB] bg-[#1C39BB] text-white"
@click="
const mlkemKey = JSON.parse(keyring).keyring;
const blob = new Blob([JSON.stringify({keyring:mlkemKey})], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'keyring.json';
a.click();
URL.revokeObjectURL(url);
"
>
Export your secret key
</button>
</template>
<label for="skupload">Import your secret key:</label>
<zencode-wrapper id="keyring" storage="local">
Scenario qp
Given I have a 'keyring'
When I create the mlkem512 public key
And I create the hash of 'mlkem512 public key'
Then print 'mlkem512_public_key'
And print the 'hash' as 'base58'
And print keyring
</zencode-wrapper>
</div>
</div>
</div>
</div>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>