Encrypted notes that disappear after one read
This tool lets you stash a short secret — a password, a recovery phrase, a private message — encrypted with a passphrase only you know. The plaintext is never written to disk. Instead the note is encrypted in your browser and only the ciphertext is kept, under a random key, in localStorage. When the note is read back with the correct passphrase it is shown once and then deleted.
How it works
The encryption uses the browser’s built-in Web Crypto (SubtleCrypto) API:
- A random 16-byte salt is generated and your passphrase is run through PBKDF2 with 150,000 iterations of SHA-256 to derive a 256-bit AES key. PBKDF2 makes brute-forcing a weak passphrase expensive.
- A random 12-byte initialisation vector (IV) is generated and the note is encrypted with AES-GCM. GCM is authenticated encryption, so a wrong passphrase or any tampering fails verification rather than producing garbage.
- The salt, IV, and ciphertext are concatenated, base64-encoded, and stored in
localStorageunder a random key id. The link you receive contains only that key id in its URL fragment — never the plaintext or passphrase.
To read: the stored blob is fetched by key id, the salt re-derives the key from the passphrase you type, and AES-GCM decrypts it. On success the entry is removed with localStorage.removeItem, so the note truly self-destructs.
Why AES-GCM and PBKDF2?
AES-GCM is an authenticated encryption mode, which means it detects tampering. If someone edits the stored blob — even by changing a single bit — decryption fails with an authentication error rather than producing corrupted plaintext. PBKDF2 with 150,000 SHA-256 iterations adds deliberate slowness to key derivation: a passphrase that would be trivially guessable by a dictionary attacker becomes hundreds of times harder to crack when each attempt requires 150,000 hashes.
Together these two choices mean the security of the note reduces entirely to the strength of your passphrase. A randomly chosen four-word passphrase is far stronger than a short memorable word.
Good use cases
- Temporary credential handoff — you need to give a colleague a database password, but the message channel (email, Slack) is not appropriate for credentials. Encrypt the note, share the passphrase verbally, and let the recipient reveal and delete it.
- Personal notes across sessions — use it like a temporary clipboard that encrypts itself. Write the note, copy the link, come back later, reveal it, and it is gone.
- Staging environment secrets — leave a one-read note with a staging key for a contractor who does not yet have permanent access.
What this tool is not
It is not a cross-device or cross-person secret-sharing service because localStorage is browser-local. For that you would need a server-side burn-after-reading service. This tool is strongest when sender and receiver share the same browser (a kiosk, a shared laptop) or when you are keeping a note for your own future self in the same browser session.
Notes and limits
Because storage is per-browser, the link is for your own machine or a shared kiosk session — not a cross-internet secret-sharing service. For one-time secrets you want to send to another person, copy the decrypted text out manually after revealing it, and pick a passphrase you can communicate over a separate channel. Clearing browser data or using private/incognito windows will also wipe stored notes.