Sealed letter

Write a message and seal it into a new HTML file that opens itself, with a passphrase or with share cards held by people you trust. Nothing you type leaves this page.

Who can open it

Anyone with the file can guess passphrases as fast as their computer allows, so use four or more random words, or the one this page suggests.

How it works, and what it protects against

The message is encrypted with AES-256-GCM under a random key. For the passphrase, that key is encrypted under a second key derived from the passphrase with PBKDF2-SHA-256 and 600,000 iterations. For share cards, the key is split with Shamir's secret sharing: any K cards rebuild it, and fewer than K say nothing about it.

The letter is a single HTML file with its ciphertext and the code to open it, and nothing else. Its Content-Security-Policy stops it from loading anything from the network.

Anyone who has the file can try passphrases offline. A slow key derivation makes that harder, but only a strong passphrase makes it hopeless. The label and the length of the message aren't hidden. And since anyone who can change the file can change its code, open a letter only if you trust where it came from.

On iPhone and iPad, an emailed .html file may open in a preview that doesn't run scripts. Save it to Files and open it in Safari.