diff --git a/web/index.html b/web/index.html
index b3823b0..bcd17d3 100644
--- a/web/index.html
+++ b/web/index.html
@@ -357,6 +357,7 @@ if (typeof document !== 'undefined') (function () {
if (!$('s-key').files[0]) throw new Error('Bitte send.key wählen.');
if (!$('s-carrier').files[0]) throw new Error('Bitte Trägerbild wählen.');
+ const keyName = $('s-key').files[0].name || 'send.key';
const key = SP.parseKey(await readFile($('s-key').files[0]));
if (key.role !== SP.ROLE_SEND) throw new Error('Das ist ein Empfangsschlüssel. Zum Senden brauchst du deinen send.key.');
const plain = encTxt.encode(text);
@@ -382,7 +383,9 @@ if (typeof document !== 'undefined') (function () {
// Aktualisierter Sendeschlüssel (Offset um Nachricht+MAC fortgeschrieben)
const nextOff = key.sendOffset + need;
const newKey = SP.buildKey(SP.ROLE_SEND, key.streamId, nextOff, key.material);
- const dk = $('s-dlkey'); dk.href = blobUrl(newKey); dk.style.display = 'block';
+ // Re-Download unter EXAKT dem hochgeladenen Namen -> überschreibt sauber.
+ const dk = $('s-dlkey'); dk.href = blobUrl(newKey); dk.download = keyName;
+ dk.textContent = `🔑 Aktualisierten ${keyName} speichern`; dk.style.display = 'block';
$('s-note').style.display = 'block';
show(st, 'ok', `Versteckt + authentifiziert. ${plain.length} B ab Offset ${key.sendOffset}. Neuer Offset: ${nextOff}.`);
}, 'image/png');
diff --git a/web/sw.js b/web/sw.js
index b805c0d..c3db3c2 100644
--- a/web/sw.js
+++ b/web/sw.js
@@ -1,7 +1,7 @@
/* schattenpost Service Worker — reines Offline-Caching der App-Shell.
Sendet NICHTS an einen Server. Cache-first, kein Netzwerk-Fallback nötig,
sobald die Shell einmal geladen ist. */
-const CACHE = 'schattenpost-v4';
+const CACHE = 'schattenpost-v5';
const SHELL = [
'./',
'./index.html',