Designing zero-knowledge notes: what the server can never read

Published 2026-05-27

The promise

A note service that says your notes are private usually means that the company promises not to look. A zero-knowledge design makes a stronger claim: the server is technically unable to look, because it never holds the keys. That changes what a database leak, a rogue administrator or a legal request can expose, and it changes how the system has to be designed.

Encrypting in the browser

The browser encrypts the note with the Web Crypto API using AES-256-GCM, an authenticated mode that detects tampering as well as hiding content. The key is derived from a secret known to the user with PBKDF2, and wrapped in a dual-key envelope, so that either of two keys can open the note. The server receives and stores only the ciphertext and the minimal data needed to deliver it.

Two details matter in practice. First, the derivation must be slow enough to make guessing expensive, which is exactly what PBKDF2 is for. Second, the encryption code must live in the client, and be small and auditable, because the whole promise rests on it.

Asking for a secret instead of sending one

Sometimes the secret is on the other side: you need a password from a colleague. The secret request flips the direction. The requester creates a key pair in the browser and keeps the private key, the sender encrypts to the public key using RSA-OAEP with a 3072-bit key combined with AES-GCM for the payload, and only the requester can open the result. At no point does the server see anything it could use.

The parts that are not cryptography

Most of the real risk sits around the cipher. Attached files carry metadata such as locations and device names, so the client strips it before encrypting, and only for the file types where the stripping is known to be complete: the product never claims coverage it does not have. Access to a note can require a passkey, with a lockout after repeated failures. Guests can create short-lived notes without an account, stored only in memory-based storage. Security headers and rate limits protect the endpoints that handle sign-in and one-time codes.

What zero-knowledge does not cover

The server still knows that a note exists, when it was created and, for delivery purposes, who it is addressed to. If a user's device is compromised, the browser can be made to leak the plaintext. And a service that serves its own JavaScript could in principle serve a malicious version, which is why the code is kept small and why the honest wording is that the server cannot read notes as designed, not that nothing could ever go wrong.

Being explicit about these limits is part of the design. A privacy promise that is overstated is worse than a modest one that is true.

© 2026 The Good Fellas