How Papyr works
The browsers do the work and the server relays. These are the answers to what technical readers ask first. The exact rules are in the documentation linked at the end.
Papyr is a relay
The server is a relay: it numbers each message, stores it and passes it on to the others in the room, and nothing more. It does not merge edits, read a document or render anything. Each browser holds the whole document as a Yjs CRDT, a structure whose edits apply in any order and always end in the same text, so the browsers do the merging and the server never has to understand an edit. That is why it can be given text it cannot read.
Where the keys come from
A room is a 32-byte secret. The browser derives two keys from it with HKDF-SHA-256: a content key, which encrypts every message with AES-256-GCM and never leaves the browser, and an access key, which it sends to be let into the room. The server checks the access key on each join and files the room under a hash of it. Whoever holds the access key can join, read the ciphertext and fill the room, but cannot turn it into the content key. Every message has its own nonce: a random sender number per page load and a counter. The secret itself sits in the part of the link after the #, which browsers never send: it is in no request, log or referrer.
Can a room be guessed?
A private room: no. Its secret is 32 random bytes from the browser's secure random source, 2^256 possibilities. There is nothing to try, and the server's operator has nothing to try it against.
A public room: yes, by design. Its key is the hash of its name, so anyone who knows or guesses the name is a member. A generated name such as quiet-amber-otter-k7q2 is one of about 2^41: from one address, joining them all takes centuries, and the server limits connections and new rooms per address. The operator can do better, by hashing names and comparing them with the room ids on disk: hours on one graphics card for generated names, an instant for a short name like notes. Use public rooms for what may be public.
Do you store the password?
No. A password room's link holds a random 32-byte salt, not the secret, and the browser derives the secret from the salt and the password with PBKDF2-HMAC-SHA-256 at 600,000 rounds. Neither the password nor the salt is sent to the server, and the browser keeps only the link in its recent rooms, never the password. Without the link nobody can test a guess. With the link, a guess costs 600,000 rounds on the guesser's own computer, about ten thousand guesses a second on a graphics card: a password of four random words holds for thousands of years, a word with a digit does not last a day.
What the server keeps
For each room: the id (the hash of its access key), the encrypted snapshot and the encrypted updates after it, the size on disk and the time of the last write. It counts IP addresses in memory for its limits and writes none, and its log has the first 8 characters of a room id at most. Nothing is kept about who is in a room, but each stored update carries a per-page-load number that groups updates and shows roughly how active that page was.
What you still have to trust
The server cannot read, change or forge a message, but it can drop or delay messages, and a lying server can hand a joining browser an older stored state without it noticing. It also delivers the page that does the encryption, so a dishonest server could serve a page that leaks the key. The command line is downloaded from GitHub and does not have that weakness. Nothing rotates a room's key and a member cannot be removed: to cut someone off, start a new room. The link is the key, so it leaks through browser history and sync, shared screens and link scanners; with a password room's link, someone can test password guesses. Traffic sizes and times are visible. The privacy page has the rest.
The full rules, the wire format and the threats, in the documentation ยท Privacy