-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
503 lines (463 loc) · 24.2 KB
/
Copy pathindex.html
File metadata and controls
503 lines (463 loc) · 24.2 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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon"
href="https://cracky.ddns.net/services/apps/crackyOS/application/com.crackyOS.pyProjects/msg-encrypt/src/img/favicon.png"
type="image/x-icon">
<meta content="Wie funktioniert die einfache Textverschlüsselung über msg und was steckt dahinter"
name="description">
<meta content="https://cracky.ddns.net/services/internal/msg.web/src/img/favicon.png" itemprop="image">
<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=Rubik:ital,wght@0,300..900;1,300..900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.teal-blue.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<title>msg-encrypt</title>
</head>
<style>
body {
font-family: "Rubik", sans-serif;
}
.section {
opacity: 0;
max-height: 0;
overflow: hidden;
filter: blur(5px);
transition: opacity 0.8s ease-in, max-height 0.6s ease-out, filter 0.3s ease-out;
}
.section.active {
opacity: 1;
max-height: 500vh;
filter: blur(0px);
}
h4 {
background: linear-gradient(45deg, rgb(117, 159, 112), rgb(50, 145, 135));
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
font-weight: 550;
user-select: none;
}
.highlight {
background-color: #e0f0ff;
padding: 10px;
border-left: 4px solid rgb(65, 107, 60);
border-radius: 15px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
background: linear-gradient(145deg, rgb(180, 247, 207), rgb(190, 255, 248), rgb(194, 255, 187));
margin-left: 10px;
margin-right: 10px;
}
.mdl-layout-title,
.mdl-navigation__link,
.mdl-button {
font-weight: 550;
}
.mdl-button {
border-radius: 20px;
margin-bottom: 40px;
user-select: none;
}
.mdl-button:hover,
.mdl-button:active {
box-shadow: none;
transition: 0.2s linear;
background-color: rgb(22, 100, 92) !important;
color: rgb(255, 230, 128);
}
.mdl-layout__drawer-button {
user-select: none;
}
.mdl-layout-title {
user-select: none;
}
.mdl-navigation__link {
user-select: none;
}
ul,
ol {
text-align: left;
}
code {
background-color: rgba(177, 177, 177, 0.578);
border-radius: 4px;
height: 10px;
}
.imprintBtnLink {
text-decoration: none;
user-select: none;
}
.imprintBtnLink:active,
.imprintBtnLink:hover {
text-decoration: underline !important;
}
div.msgLogo {
margin-top: 45px;
height: 200px;
width: 200px;
background: linear-gradient(145deg, rgb(101, 248, 162), rgb(99, 187, 159), rgb(193, 119, 193), rgb(182, 182, 98), rgb(5, 170, 154), rgb(104, 212, 92));
border-radius: 35px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
img.logo {
margin-top: 5px;
height: 190px;
width: 190px;
}
@keyframes spin {
0% {
transform: rotate(0deg) scale(1);
}
20% {
transform: rotate(20deg) scale(1.05);
}
100% {
transform: rotate(360deg) scale(1);
}
}
.spin-once {
animation: spin 0.7s ease-in-out;
}
</style>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title" id="masterTitle">msg-encrypt</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation">
<a id="homeIcon" class="mdl-navigation__link" style="display: none;"
onclick="showSection('home', 'msg-encrypt'); navigator.vibrate(20);">
<i class="material-icons">home</i>
</a>
</nav>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Menü</span>
<nav class="mdl-navigation">
<a class="mdnavlink mdl-navigation__link" id="homeLink" onclick="showSection('home', 'msg-encrypt');"
style="display: none;">Startseite</a>
<a class="mdnavlink mdl-navigation__link" id="definitionLink"
onclick="showSection('definition', 'Was ist msg'); hideLink('definitionLink');">Was ist msg?</a>
<a class="mdnavlink mdl-navigation__link" id="exampleLink"
onclick="showSection('example', 'Beispiel'); hideLink('exampleLink');">Verschlüsselung Beispiel</a>
<a class="mdnavlink mdl-navigation__link" id="explainationLink"
onclick="showSection('explaination', 'Funktionsweise'); hideLink('explainationLink');">Funktionsweise
von msg</a>
<a class="mdnavlink mdl-navigation__link" id="detailexplainLink"
onclick="showSection('detailexplain', 'Erklärung im Detail'); hideLink('detailexplainLink');">Verschlüsselung
im Detail</a>
<a class="mdnavlink mdl-navigation__link" id="advantagesLink"
onclick="showSection('advantages', 'Vorteile von msg'); hideLink('advantagesLink');">Vorteile von
msg</a>
<a class="mdnavlink mdl-navigation__link" id="imprintLink"
onclick="showSection('imprint', 'Impressum'); hideLink('imprintLink');">Impressum</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
<center>
<div id="home" class="section active" style="max-width: 80%;">
<h4>🔐 Sicher. Einfach. Verständlich. <b>msg</b>!</h4>
<div class="msgLogo"
style="user-select: none; pointer-events: none; transform: scale(0.6); margin-top: -30px!important;">
<img class="logo" loading="lazy"
src="https://cracky.ddns.net/services/apps/crackyOS/application/com.crackyOS.pyProjects/msg-encrypt/android.app/icon.png">
</div>
<p style="text-align: justify!important;">
Stell dir vor, du willst jemandem eine vertrauliche Nachricht schicken. Natürlich willst du,
dass nur der Empfänger sie lesen
kann. Genau dafür ist diese Verschlüsselung gemacht!<br>
<hr><strong>msg</strong> ist deine App für
sichere, verschlüsselte Kommunikation – einfach zu bedienen und technisch auf dem neuesten
Stand.
</p>
<br><br>
<button
onclick="showSection('definition', 'Was ist msg'); hideLink('definitionLink'); navigator.vibrate(20);"
type="button" class="mdl-button mdl-button--raised mdl-button--colored ">
→ entdecke msg
</button>
</div>
<div id="definition" class="section" style="max-width: 80%;">
<h4>💡 msg – Sicher. Schnell. Verschlüsselt.</h4>
<div class="highlight">
<p>Die App nutzt die bewährte <strong>Fernet-Verschlüsselung</strong>, um deine Nachrichten
zu schützen – das heißt: Nur du und der Empfänger können lesen, was geschrieben wurde.
</p>
</div>
<h4>So funktioniert msg:</h4>
<ul>
<li>📲 Es gibt eine <strong>Android-App</strong>, mit der du bequem unterwegs Nachrichten
senden und empfangen kannst.</li>
<hr>
<li>🧠 Im Hintergrund läuft ein <strong>Python-Server</strong>, der die Kommunikation
zwischen den Geräten sichert und verarbeitet – natürlich ohne selbst Inhalte lesen zu
können.</li>
<hr>
<li>💻 Für Entwickler, Power-User oder zum Experimentieren gibt es zusätzlich eine
<strong>reine Python-Version</strong> der App, die direkt auf dem PC läuft – ideal z. B.
für automatisierte Kommunikation oder Integration in eigene Projekte.
</li>
<hr>
</ul>
<p>Egal ob mobil (Android) oder desktop (Python): <strong>msg</strong> gibt dir volle Kontrolle
über deine Daten – sicher und privat.</p>
<br><br>
<button
onclick="showSection('example', 'Beispiel'); hideLink('exampleLink'); navigator.vibrate(20);"
type="button" class="mdl-button mdl-button--raised mdl-button--colored ">
ein Beispiel dafür
</button>
<br><br>
</div>
<div id="example" class="section" style="max-width: 80%;">
<h4>Beispieltext: <b>Hallo</b></h4>
<p>in verschlüsselt:</p>
<div>
<code style="line-break: anywhere; font-family: monospace;">
<i>Z0FBQUFBQm9DQWM5YjFKVGFLckx3X0UtQ0pzdHFiTlFUbks5cTFRVk9ZNmo2QzNyajJUNDRUcHFac3duZmVqZnhVZFFCb08tYnFMcHNkUDBkZ2xoZmpLUERKVkpqVlpaQ2c9PQ==</i>
</code>
</div>
<br>
<p>und ohne den richtigen Schlüssel, geht nichts:</p>
<div>
<code style="line-break: anywhere; font-family: monospace;">
<i>�h=oRSh����>�-��PNr��T9���-�d��:jf�'}���GP��n����va~2��I�VY</i>
</code>
</div>
<br><br>
<div class="highlight">
<p>Die <strong>Fernet-Verschlüsselung</strong> schützt deine Nachricht, indem sie sie in
unlesbaren Zeichensalat verwandelt. Nur mit dem passenden Schlüssel kann sie wieder
entschlüsselt werden.</p>
</div>
<br><br>
<button
onclick="showSection('explaination', 'Funktionsweise'); hideLink('explainationLink'); navigator.vibrate(20);"
type="button" class="mdl-button mdl-button--raised mdl-button--colored ">
Funktionsweise
</button>
</div>
<div id="explaination" class="section">
<br>
<h4>Was passiert dabei?</h4>
<br>
<ul>
<li><strong>Verschlüsseln:</strong> Deine Nachricht wird mit einem geheimen Schlüssel
gesichert. Außenstehende sehen nur unverständlichen Code.</li><br>
<li><strong>Entschlüsseln:</strong> Nur du oder dein Empfänger mit dem richtigen Schlüssel
könnt die Nachricht wieder lesbar machen.</li><br>
<li><strong>Sicherheits-Check:</strong> Zusätzlich wird ein digitaler Fingerabdruck deiner
Nachricht gespeichert, um Manipulationen zu erkennen.</li><br>
</ul>
<br><br>
<button
onclick="showSection('detailexplain', 'Erklärung im Detail'); hideLink('detailexplainLink'); navigator.vibrate(20);"
type="button" class="mdl-button mdl-button--raised mdl-button--colored ">
zur detaillierten Erklärung
</button>
</div>
<div id="detailexplain" class="section">
<h4>🔐 Wie funktioniert <b>Fernet</b>?</h4>
<p>Fernet ist ein Standard für die sichere, symmetrische Verschlüsselung von Nachrichten – das
bedeutet: derselbe Schlüssel wird sowohl zum Verschlüsseln als auch zum Entschlüsseln
verwendet.</p>
<div class="box">
<strong>Wichtig:</strong> Fernet stellt sicher, dass eine Nachricht nicht nur vertraulich
ist (verschlüsselt), sondern auch nicht manipuliert wurde (Authentizität durch Signatur).
</div>
<h4>Schritt-für-Schritt erklärt</h4>
<ol>
<li><strong>Schlüssel erzeugen:</strong><br>
Ein 32-Byte-Schlüssel wird zufällig erstellt – das ist dein geheimer Zugangscode.<br>
<code>key = Fernet.generate_key()</code>
</li>
<br>
<li><strong>Nachricht verschlüsseln:</strong><br>
Mit dem Schlüssel wird dein Text sicher in einen sogenannten <em>Token</em>
verwandelt:<br>
<code>ciphertext = Fernet(key).encrypt(b"geheim")</code>
</li>
<br>
<li>
<strong>Struktur des Tokens:</strong><br>
Der verschlüsselte Token besteht aus mehreren Bestandteilen:
<ul>
<li>📅 <strong>Timestamp:</strong> Wann wurde die Nachricht verschlüsselt?</li>
<li>🔐 <strong>IV:</strong> Eine zufällige Start-Nummer (Initialisierungsvektor)
</li>
<li>🧪 <strong>HMAC:</strong> Ein digitaler Fingerabdruck, der Manipulationen
erkennt</li>
<li>🧩 <strong>Der verschlüsselte Inhalt</strong></li>
</ul>
</li>
<br>
<li>
<strong>Entschlüsselung:</strong><br>
Nur mit dem gleichen Schlüssel kann der Text wieder lesbar gemacht werden:<br>
<code>message = Fernet(key).decrypt(ciphertext)</code>
</li>
</ol>
<h4>Warum ist <b>Fernet</b> sicher?</h4>
<ul>
<li>✅ Nutzt moderne Verschlüsselung (AES in CBC-Modus mit 128 Bit)</li>
<li>✅ Authentifizierung durch HMAC mit SHA256 – verhindert Manipulationen von Angreifern
</li>
<li>✅ Einfach zu implementieren, auch ohne tiefes Kryptowissen</li>
</ul>
<h4>Mehr Infos für<br>Technikinteressierte</h4>
<p style="max-width: 80%;">
Wenn du tiefer einsteigen möchtest, findest du hier die offizielle Dokumentation:
<br>
→ <a href="https://cryptography.io/en/latest/fernet/" target="_blank">
cryptography.io – Fernet Documentation
</a><br><small>(externer Link)</small>
</p>
<br><br>
<button
onclick="showSection('advantages', 'Vorteile'); hideLink('advantagesLink'); navigator.vibrate(20);"
type="button" class="mdl-button mdl-button--raised mdl-button--colored ">
Vorteile
</button>
<br><br>
</div>
<div id="advantages" class="section" style="max-width: 90%;">
<h4>Deine Vorteile</h4>
<ul>
<li>✅ <strong>Sicher:</strong> Moderne Kryptotechnologie schützt deine Daten.</li>
<li>✅ <strong>Einfach:</strong> Nur ein Klick – und deine Nachricht ist geschützt.</li>
<li>✅ <strong>Vertraulich:</strong> Ohne Schlüssel bleibt alles geheim.</li>
</ul>
<p style="text-align: justify;">
<strong>Fazit:</strong> Diese Methode ist ideal, wenn du sensible Informationen übermitteln
möchtest – privat oder beruflich. <br>
<b>Deine Daten. Deine Kontrolle. Deine Sicherheit.</b>
<br>
Falls es dich interessiert, kannst du <a
href="https://cracky.ddns.net/d/msg-encrypt/latest/" target="_blank"
rel="noopener noreferrer">hier</a> msg herunterladen.
<br>
Bitte beachte meine <a href="https://github.com/cracky22/msg_encrypt/blob/master/LICENSE.md"
target="_blank">Lizenzvereinbarungen</a>
</p>
<br><br>
<button onclick="showSection('home', 'msg-encrypt'); navigator.vibrate(20);" type="button"
class="mdl-button mdl-button--raised mdl-button--colored ">
zur Startseite
</button>
<br>
<a onclick="showSection('imprint', 'Impressum'); hideLink('imprintLink');"
clss="imprintBtnLink">Impressum</a>
</div>
<div id="imprint" class="section">
<br><br><br>
<div class="msgLogo" id="msgLogo">
<img class="logo" id="logo" loading="lazy"
src="https://cracky.ddns.net/services/apps/crackyOS/application/com.crackyOS.pyProjects/msg-encrypt/android.app/icon.png">
</div>
<br><br>
© <a href="https://cracky.ddns.net/" target="_blank"
style="color: rgb(0, 0, 0,); text-decoration: none;">cracky></a> by <a
href="https://cracky.ddns.net/about%20me" target="_blank">Martin Blieninger</a>
<br>
Diese Website wird gehostet mit <a href="https://pages.github.com/" target="_blank"
style="color: rgb(8, 135, 43);">GitHub
Pages</a>.
<br>
Diese Website verwendet Material Design Lite von Google,<br>Lizenz: <a
href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank"
style="color: rgb(158, 33, 101);">Apache 2.0</a>.
<br><br>
<button onclick="showSection('home', 'msg-encrypt'); hideLink('homeLink');" type="button"
class="mdl-button mdl-button--raised mdl-button--colored ">
zur Startseite
</button>
</div>
<div id="secret" class="section">
<br>
<pre>ist leer :)</pre>
<br><br>
<button onclick="showSection('home', 'msg-encrypt');" type="button"
class="mdl-button mdl-button--raised mdl-button--colored ">
zur Startseite
</button>
</div>
</center>
</div>
<script>
function showSection(id, title) {
console.log(`showSection(id=[${id}], title=[${title}]);`);
const sections = document.querySelectorAll('.section');
sections.forEach(section => {
section.classList.remove('active');
});
const target = document.getElementById(id);
if (target) {
target.classList.add('active');
}
if (title) {
setTimeout(() => {
document.getElementById("masterTitle").innerText = title;
}, 400);
}
if (id !== "home") {
setTimeout(() => {
document.getElementById("homeIcon").style.display = "block";
document.getElementById("homeLink").style.display = "block";
}, 400);
} else {
setTimeout(() => {
document.getElementById("homeIcon").style.display = "none";
document.getElementById("homeLink").style.display = "none";
document.getElementById("masterTitle").innerText = "msg-encrypt";
}, 400);
}
}
function hideLink(id) {
console.log(`hideLink(id=[${id}]);`);
const sections = document.querySelectorAll('.mdnavlink');
sections.forEach(section => {
section.style.display = "block";
});
if (id) {
setTimeout(() => {
document.getElementById(id).style.display = "none";
}, 500);
}
}
let clickCount = 0;
const img = document.getElementById('msgLogo');
img.addEventListener('click', () => {
clickCount++;
if (clickCount < 3) {
navigator.vibrate(80);
img.classList.remove('spin-once');
void img.offsetWidth;
img.classList.add('spin-once');
}
if (clickCount === 3) {
navigator.vibrate(300);
setTimeout(() => {
navigator.vibrate(50);
setTimeout(() => {
navigator.vibrate(50);
setTimeout(() => {
navigator.vibrate(100);
}, 100);
}, 100);
}, 100);
document.getElementById("imprintLink").style.display = "block";
showSection('secret', "Geheimes Menü");
clickCount = 0;
}
});
</script>
</main>
</div>
</body>
</html>