247999.XYZ Home / How encryption works
Sign inCreate account

How encryption works

The exact steps your browser takes, and what our server ends up holding.

The building blocks

We use the encryption built into every modern browser (WebCrypto: AES-256-GCM and HKDF-SHA-256) and the Argon2id password-hashing function from the open-source hash-wasm library. We don't use any home-made cryptography.

Private links

  1. Your browser makes a random 256-bit key and encrypts your text with it.
  2. The ciphertext is uploaded. The key is put in the link after #. Browsers never send that part to a server.
  3. Opening the link proves you hold the key, so someone who only knows the link's ID can't open or burn it.

Your account

When you sign up, your browser stretches your password with Argon2id (64 MB of memory, 3 passes) and splits the result in two:

  • An auth key that is sent to sign you in. We store only a hash of it.
  • An encryption key that never leaves your device. It locks a random master key, which encrypts your notes and vault.

Your browser also makes a recovery key that locks a second copy of the master key. You keep it; we never see it.

Follow a note from password to ciphertext

  1. Enter your password. The browser reads your account salt and uses Argon2id with 64 MiB of memory, three passes and one lane. A salt makes two accounts with the same password start from different inputs.
  2. Separate sign-in from unlocking. HKDF derives two keys for different purposes. The sign-in key proves account access. The wrapping key opens the encrypted copy of the master key on your device. Changing a password wraps that same master key again, so you can still read earlier notes.
  3. Save a note. The browser derives an item encryption key from the master key. AES-256-GCM uses a fresh twelve-byte IV for each encryption. The item ID and type are authenticated along with the content. Trying to open the ciphertext as a different item fails the integrity check.

What travels with a shared link?

Look at the two parts of a link before sending it. The address before the hash identifies the stored message. The fragment after it carries random key material that stays in the recipient's browser. When the reader chooses Open, the browser derives a verifier and a separate decryption key. The server checks the verifier before returning the ciphertext. With password protection, the browser also needs the separate password to derive the right pair.

A screenshot of the entire link can carry everything a recipient needs to open an unprotected message. Send the full link only to its intended reader and share any extra password through another channel. Once the reader has copied the plaintext, expiry cannot remove that copy.

If you forget your password

You haveWhat happens
Your recovery keyReset your password by email, enter the recovery key, and everything opens as before.
No recovery keyYou get your account back, but old notes can't be decrypted by anyone. You can start fresh.

What this can't protect against

Like every web app, the code runs from our server each time you visit. If our server were taken over, an attacker could change that code. We reduce the risk with a strict Content Security Policy and self-hosted libraries. Notes, Vault and shared links load only our own scripts.