Security model
OneTimePass is zero-knowledge: your secret is encrypted in your browser before it is sent, and the server only ever stores ciphertext it cannot read.
Encryption
- Secrets are encrypted client-side with AES-256-GCM (Web Crypto API).
- A fresh random 256-bit key and 96-bit IV are generated for every secret, so a key or nonce is never reused.
- The key is placed in the URL after
#— the fragment, which browsers never send to a server. The server therefore receives only ciphertext.
Passphrase mode
- Optionally, a passphrase is mixed in: a key is derived with PBKDF2-SHA256 (310,000 iterations) and combined with the link key via HKDF, so both the link and the passphrase are required to open the secret.
- Share the link one way (e.g. email) and the passphrase another (e.g. phone). The server sees neither.
One-time reads
- Revealing a secret runs a single atomic database operation, so two people opening the same link can never both see it — and a multi-open link decrements its remaining count until it is deleted.
- Burn authority is bound to the link key: a caller proves possession of it (without revealing it to the server) before a secret can be consumed, so merely knowing the id is not enough.
- Opening a link only checks that a secret exists; it is consumed solely by an explicit reveal, so link-preview bots cannot burn it.
Expiry & storage
- Every secret has a hard lifetime (10 minutes to 90 days) and is swept automatically, so unread secrets do not linger.
- The server stores only ciphertext and public parameters (IV, KDF salt/iterations) — never plaintext, keys, or passphrases, and it logs none of them.
Hardening
- Strict Content-Security-Policy, HSTS,
X-Frame-Options: DENY,nosniff, andReferrer-Policy: no-referreron every response. - 128-bit unguessable ids; per-IP rate limiting on creation; a hard request-body size cap.