The server holds a locked box.
The key never reaches it.
Need to send a password, an API token or a recovery code? Don't put it in a chat that lives forever. Paste it here: your browser locks it, the server stores the locked box, and only the link you share can open it — once.
Is nothing stored? Not quite, and it matters. The server does store something: the ciphertext, until it expires or is opened once. It just can't read it. That is why reading can be open to anyone — and why the real risks are abuse and a tampered page, not a database leak. Both are covered below.
Watch a secret travel
Lock something in this page
This uses your browser's built-in encryption (Web Crypto, AES-256-GCM) right here. Nothing you type is sent anywhere — open your browser's network tab to check.
This browser has no Web Crypto here (it needs https). The real service won't work in it either.
Simplified: PrivateBin also compresses the text and derives the working key through PBKDF2 (100,000 rounds), and can add an optional password. The shape is the same.
The two halves of a link
A link has a part your browser sends and a part it keeps. The part after # — the fragment — is never put in the HTTP request. That is the whole trick.
# — stays in the browser. It is read by the page's JavaScript to unlock the box, and never travels.What the server literally receives when you open that link
Host: {{paste_host}}
(no key anywhere in the request)
This is specified in RFC 3986 §3.5 and described on MDN. Browsers do not send the fragment in requests or in the Referer header, so it doesn't reach server logs either.
What the server sees, and what the link holds
The server sees
- That a paste exists, and its id
- The ciphertext (random-looking bytes)
- Roughly how big it is
- When it was made, and when it's read
- The IP address of whoever connects (the paste service keeps no request log)
The link holds
- The paste id (which box)
- The key after
#(how to open it) - Nothing else: no words, no username
Anyone with the whole link can read the secret. Treat the link as the secret.
Half is useless
- Server without the key: a box it can't open
- Key without the box: nothing to open
- Optional password: a second lock, shared another way
What it protects, and what it can't
The server's disk, backups or database leak
An attacker gets locked boxes and no keys. AES-256-GCM is also tamper-evident: a changed box simply fails to open.
Web-server and proxy logs
They contain the paste id, never the key, because the fragment is never sent.
{{operator_title}}
{{operator_can_see}}
The link being intercepted in transit
Whoever sees the whole link can open it. Burn-after-reading, on by default, turns that into detection: if you open it and it's gone, someone else did. Send the optional password through a different channel for a real second factor.
Chat apps that preview links
Preview bots fetch URLs. A burn-after-reading paste asks “Yes, see it” first, so a bot can't burn it — and the bot never gets the key anyway.
Metadata
When a paste was created, its size, and the IP addresses that connected are visible to the server. The content is not.
A compromised server serving malicious JavaScript
The code that encrypts is delivered by the same server, every visit. An attacker who controls the server could ship a page that copies your secret before it is encrypted. “Zero-knowledge” holds only while the server is honest about the page it serves. What reduces the risk here: the stock, unmodified PrivateBin image, pinned by digest so it can't change on its own; a strict Content-Security-Policy; a read-only container with no extra privileges. What it can't remove: you are trusting this server to serve the right page. For secrets whose loss would be severe, use software you install and verify yourself (Signal, age, GPG).
Injected script and tampered files: CSP and SRI
Both are left at PrivateBin's strict defaults, with no relaxations (the page template that adds the “How this works” link adds no script and no style). The Content-Security-Policy allows scripts only from the page's own origin: no inline script, and no eval (the one exception is WebAssembly compilation, which the page's compression needs). It also forbids framing and form posts, so an injected snippet in an attacker's markup can't run. It does not stop script that is already part of the page from sending data elsewhere, because the page may connect to any address. Subresource Integrity pins a hash for every script file, so a file swapped or corrupted in transit or in a cache is refused by the browser. Neither helps if the server itself serves a new page with new hashes, which is the card above.
Your device, or the recipient's
Malware, a shoulder-surfer, or a screenshot defeats any encryption in transit.
Who can create, who can read
Opening a link needs no account, so a recipient never has to sign up. Creating a paste needs {{signin_phrase}}: the site's edge checks your session before it lets any write reach the service. That closes the main abuse door, since an open pastebin is free storage for anyone. It does not change what the server can read, which is still nothing. Anyone without a sign-in who wants to send you a secret can't use this; ask for a link instead.
The service is also bounded, as a second line:
Four habits
Read the primary sources
- PrivateBinThe project behind this service
- PrivateBin on GitHubSource code, releases, issues
- PrivateBin FAQSecurity model and common questions
- PrivateBin wikiConfiguration, hardening, operation
- The 2014 ZeroBin security auditAn independent audit of PrivateBin's ancestor, and what was fixed after it
- PrivateBin's published vulnerability reportsPast issues, disclosed openly
- MDN: the URL fragmentWhy the part after # stays in the browser
- MDN: Web Crypto, AES-GCMThe encryption primitive in your browser
- MDN: Web Crypto APIThe whole API, and when it is available
- RFC 3986 §3.5: FragmentThe specification
- OWASP: Cryptographic StorageCheat sheet on how to encrypt stored data
- OWASP: Secrets ManagementWhere secrets should and shouldn't live
{{we_looked}} for a recent independent audit of current PrivateBin and did not find one; the links above are what is public. Judge accordingly.