How your secret is stored
Your secret is locked in your browser before it leaves your device. The server keeps only the locked version, hands it out once and deletes it. The key to unlock it travels only inside the link you send.
The journey of a secret
-
Your browser encrypts the secret
It creates a new random 256-bit key and a random 96-bit IV for this one secret, and encrypts it with AES-256-GCM using the browser’s built-in Web Crypto API.
-
The server stores unreadable data
Only the encrypted data (IV, ciphertext and authentication tag) is uploaded. The server, a Cloudflare Pages Function, picks a random 128-bit id and stores one row: the id, the encrypted data and the expiry time.
-
You send the link
The link holds the id and the key after the
#. You pass it on yourself, by chat, email or any other way. The key is never sent to the server. -
The recipient presses “Reveal”
Opening the link only shows a “Reveal secret” button; it does not use the secret up. Chat apps and email scanners that open links to build previews therefore cannot destroy it. Pressing Reveal sends a POST request, and the server hands over the encrypted data and deletes it in the same step.
-
The recipient’s browser decrypts it
Decryption happens on the recipient’s device, with the key from the link. If the data was changed or damaged, GCM’s authentication tag makes decryption fail instead of showing wrong text. The key is then removed from the address bar.
Anatomy of a link
A one-time link has two parts after the #, separated by a dot.
https://onetimepass.pages.dev/#q3Vb8sKx2LmN0pRtYw7uEa.Zr4nT9vXc2bQ8hLk1mW5sJy0aDfG3pE7uN6iKoH2tRw
- Id
- Identifies the stored data. Your browser sends it to the server to fetch the encrypted data.
- Key
- Decrypts the data. It is never sent to the server; it travels only inside the link you send.
Browsers do not include the part after # in requests, and the page’s code sends only the id. The
page also sets Referrer-Policy: no-referrer, so the address is not passed to other sites either.
The example above is made up.
What the server stores and never sees
Stored, for each secret
- A random id (128 bits)
- The encrypted data: IV, ciphertext and authentication tag
- The expiry time
One row in a Cloudflare D1 database. It is deleted when the secret is revealed, or after it expires (see when the data is deleted).
Never sent to the server
- Your secret as readable text
- The key
Not stored by this site
- Your IP address
- Accounts
- Cookies (the secret site sets none; this information site sets Google Analytics cookies only if you accept)
- Your browser and device details (user agent)
- Analytics (none on the secret site)
Cloudflare, the host, sees IP addresses and request details as part of serving any website. The secret site (onetimepass.pages.dev) loads no third-party scripts, fonts or trackers on any page. Only this information site, and only if you accept, uses Google Analytics (see privacy).
When the data is deleted
-
When “Reveal” is pressed
A single database statement deletes the row and returns the encrypted data in the same step. The data is gone from the database the moment it is handed out. If two people press Reveal at the same time, only one gets it.
-
If nobody opens the link
The sender picks 1 hour, 1 day or 7 days. An expired secret is never handed out; this is checked on every read. Its encrypted data is removed on the next request to the service’s API after expiry (creating, checking or revealing any secret), not by a timer and not by merely viewing a page. On an idle site it can stay stored until then, still unreadable without the key.
-
In the browser
After Reveal, the key is removed from the address bar, and the page clears the secret from the screen when you leave it.
-
Cloudflare’s recovery copy
Reveal deletes the row at once, but Cloudflare D1 keeps its own point-in-time recovery history (Time Travel) for 7 days. That history holds only the encrypted data, never the key. So someone with access to the database account and the full old link could recover an opened secret during that time. After you send a secret, treat the link itself as sensitive.
What we cannot protect against
Encryption protects the secret on the server. It cannot fix everything around it.
-
Someone gets the link first
Whoever opens the link first can reveal the secret. The recipient then sees “no longer available”, which at least shows that the link was intercepted. If that happens, change the password or token you shared.
-
Malware or a compromised browser
If the sender’s or recipient’s device or browser is compromised, the secret can be read there, before encryption or after decryption.
-
The link stays in chat history
The link remains wherever you sent it. Once it has been opened or has expired, the secret is gone from the database; only the leftover copies described under “When the data is deleted” could still be decrypted with it.
-
An unopened link is in browser history
Until Reveal is pressed, the full link, key included, is in the recipient’s browser history, and history sync can copy it to the browser maker’s servers. After Reveal the page removes the key from the address bar, but history entries made before that stay.
-
Trusting the code this site serves
The encryption runs in code that this site sends to your browser, so you have to trust that code. The same is true for any web-based tool.
The password generator
The password and token generator runs entirely in your browser, using crypto.getRandomValues. It
uses rejection sampling, so every character is equally likely (no modulo bias). A generated value is never sent
anywhere unless you create a link with it, and then only encrypted.
On the command line
The command-line tool uses the same encryption and the same links. It encrypts on your computer, so the server never sees the secret or the key there either.
Questions
Can you read my secret?
No. The server only receives encrypted data. The key that decrypts it is in the part of the link after
#, which is never sent to the server.
Why does opening the link not show the secret right away?
Chat apps and email scanners often open links to build previews. If opening the link used the secret up, a preview could destroy it before the recipient sees it. Only pressing “Reveal” uses it.
The recipient says the secret is “no longer available”. What now?
The link was already opened or has expired. If the recipient did not open it, someone else may have. Change the password or token you shared, then send a new link.
Can I check whether my link was opened?
Yes, without using it up. Open your own link and do not press “Reveal”, or run
onetime status - and paste the link. If the secret is still waiting, you see the Reveal button;
“no longer available” means it was revealed or has expired.
What happens if the link is cut off or changed?
If the link is incomplete, the page says so before anything is used up. If the key was changed, decryption fails instead of showing wrong text. In that case the secret has already been deleted, so ask for a new link.
I lost the link. Can you send it again?
No. The link is the only copy of the key, and the server never had it. Create a new link.
How large can a secret be?
Up to 16 KB. The service stores at most 20,000 secrets at once, counting every secret not yet revealed. Expired secrets count until they are removed on the next request. When it is full, creating a new link fails until space frees up. While more than 80 % of that is in use (16,000 on this site), new links can last at most 1 day.
Does the site use cookies or analytics?
The site where secrets are created and opened (onetimepass.pages.dev) loads nothing from other sites and has no analytics or cookies on any page. This information site (how it works and privacy) uses Google Analytics to count visits only if you accept. Each site remembers your theme choice, and this site your cookie choice, only in your own browser’s storage.