Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security Toolsconpot v1.0.0(21.09.2026 um 07:32 Uhr)
IT Security ToolsZircolite v4.0.0(21.09.2026 um 08:27 Uhr)
IT Security NachrichtenWaterPlum Hackers Steal $10.7M in Crypto From IT Workers(21.09.2026 um 08:52 Uhr)
Sicherheitslücken (CVE)Die größte Schwachstelle sitzt am Schreibtisch - kommunal.at(21.09.2026 um 07:36 Uhr)
IT Security NachrichtenIT Security News Hourly Summary 2026-09-21 08h : 6 posts(21.09.2026 um 08:00 Uhr)
IT Security Toolsconpot v1.0.0(21.09.2026 um 07:32 Uhr)
IT Security ToolsZircolite v4.0.0(21.09.2026 um 08:27 Uhr)
IT Security NachrichtenWaterPlum Hackers Steal $10.7M in Crypto From IT Workers(21.09.2026 um 08:52 Uhr)
Sicherheitslücken (CVE)Die größte Schwachstelle sitzt am Schreibtisch - kommunal.at(21.09.2026 um 07:36 Uhr)
IT Security NachrichtenIT Security News Hourly Summary 2026-09-21 08h : 6 posts(21.09.2026 um 08:00 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How Zero-Knowledge Encryption Actually Works (with the Web Crypto API)

Reagiere als Erste:r — dein Feedback zählt!

"Zero-knowledge" gets thrown around a lot in privacy marketing, but it has a precise, testable meaning: the server operator has no ability to read your data — not as a policy promise, but as a mathematical fact. Let's build the mental model from primitives, using nothing but the browser's native window.crypto.subtle (the Web Crypto API). No third-party crypto libraries.

1. The threat model

Assume the server is hostile, or will be subpoenaed, or will be breached. A note-taking app that "encrypts at rest" and promises not to peek doesn't survive this model — the operator holds the keys. Zero-knowledge flips it: the key never exists on the server in the first place.

2. Deriving a key from a password (PBKDF2)

Passwords are low-entropy, so you never use them directly as keys. You stretch them with a slow KDF. A production-safe configuration in 2026:

  • Algorithm: PBKDF2 with SHA-256
  • Iterations: 100,000 (raises brute-force cost)
  • Salt: 128-bit random per note (defeats rainbow tables)
async function deriveKey(password, salt) {
  const enc = new TextEncoder();
  const keyMaterial = await crypto.subtle.importKey(
    "raw", enc.encode(password), "PBKDF2", false, ["deriveKey"]
  );
  return crypto.subtle.deriveKey(
    { name: "PBKDF2", salt, iterations: 100000, hash: "SHA-256" },
    keyMaterial,
    { name: "AES-GCM", length: 256 },
    false,
    ["encrypt", "decrypt"]
  );
}

3. Encrypting with AES-256-GCM

GCM is authenticated encryption: it gives you confidentiality and tamper-detection in one primitive. Generate a fresh 96-bit IV for every encryption so identical plaintext never yields identical ciphertext.

async function encryptNote(plaintext, password) {
  const salt = crypto.getRandomValues(new Uint8Array(16)); // 128-bit
  const iv   = crypto.getRandomValues(new Uint8Array(12)); // 96-bit
  const key  = await deriveKey(password, salt);
  const ciphertext = await crypto.subtle.encrypt(
    { name: "AES-GCM", iv },
    key,
    new TextEncoder().encode(plaintext)
  );
  // Only these three values leave the browser:
  return { salt, iv, ciphertext };
}

The critical line is the last comment. The server receives salt, iv, and ciphertext — three values that are indistinguishable from random bytes without the password. There is no plaintext to leak, subpoena, or sell.

4. Why this is the only honest form of "private notes"

If a service can read your notes, then "we don't" is a policy that can change with an acquisition, a court order, or a breach. If a service architecturally cannot read your notes, the guarantee holds even when the company doesn't. That's the whole point of a zero-knowledge architecture: compromise of the server yields ciphertext, not content.

5. Persistent vs. ephemeral

There are two families here. Ephemeral tools (think one-time secret links) destroy the note after a single read — great for handing someone a password once. Persistent zero-knowledge notepads keep the encrypted blob at a stable URL so you can come back to it across devices. They're complementary, not competitors.

I've been using SecureText, a free encrypted notepad, as my persistent scratchpad because it implements exactly the flow above — AES-256-GCM, PBKDF2-SHA-256 at 100k iterations, Web Crypto only — and adds developer-friendly touches like multi-tab notes and custom URL slugs instead of random IDs. No account, no tracking, and you can inspect the client-side crypto in your own dev tools.

Takeaways

Never use a password as a key — stretch it with PBKDF2 (or Argon2).
Use authenticated encryption (AES-GCM), fresh IV every time.
If plaintext or keys touch the server, it isn't zero-knowledge.
Audit the client. Open dev tools and confirm what actually gets sent.
If you're building anything that stores user text, run the network tab and ask one question: can the server read this? If yes, your users are trusting you, not math.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How Zero-Knowledge Encryption Actually Works (with the Web Crypto API)

Thematisch verwandte Begriffe: ZeroKnowledge, Encryption, Actually, Works · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94030 | A security vulnerability has been detected in SerenityOS up to 3d83e4509…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick