Papyr Write together in Markdown. The server can't read it. Try it GitHub

Privacy in Papyr

What Papyr protects, from whom, and where it stops. How the keys are made, whether a room can be guessed and whether the password is stored: how-it-works.md. The exact rules and every threat: spec/relay-protocol.md, “What the server sees and can do” and “Threats”.

What is encrypted

Everything you write, the snapshots of a room, and your presence (name, colour, caret) are encrypted in your browser with AES-256-GCM before they are sent. The key is derived from the part of the room’s link after the #, which browsers never send to a server. The server stores and passes on messages it has no key for.

A sealed room (/r#s.<secret>; “New private room” on the start page) has 32 random bytes in its link. Nobody finds that by guessing, the server’s operator included.

A password room (/r#p.<salt>; “New private room” with “Also ask for a password”) needs its link and a password: the key is derived from both in your browser (PBKDF2, 600,000 rounds, about half a second). The link alone opens nothing, so it can travel one way (a chat) and the password another (said aloud). Papyr keeps only the link in the browser’s recent rooms, never the password, and asks for it every time the room opens. A wrong password opens another, empty room: the page says that no room is stored under this password, and starts one with it only after you type it again. A password cannot be changed; a new password is a new room.

A password room is as strong as its password, against whoever has the link. Such a person can try passwords on their own computer, without asking the server, at roughly ten thousand guesses a second per graphics card. A short or common password (six random letters, a word with a digit) falls within a day. Four random words or more (copper lantern meadow quietly) hold for thousands of years. Without the link nobody can test a guess.

An open room (/r#notes; “public room” on the pages) is encrypted the same way, but its key comes from its name. Anyone who knows or guesses the name can read and change it, and the operator can find names by trying them against the rooms on disk. That is why the start page and the Share popover say “public”. “New public room” makes a generated name of three words and four characters (quiet-amber-otter-k7q2, about 2^41 names): hard to guess, not secret. Use open rooms for things that may be public, and a sealed room for anything private.

Your IP address

The server sees the IP address of every connection. Papyr keeps it only in memory, to limit how many connections and new rooms one address can open, and writes it to no log or file. Whoever runs the server, or the proxy, host or network in front of it, may still log it: Papyr cannot check that. Everyone in a room connects to the same server, so the operator sees which addresses join the same room.

If you do not want the server to see your address, use a VPN or Tor Browser. Tor hides it best, but many people share an exit address and the limits are per address, so you may be refused (too many connections or too many new rooms): get a new circuit and try again. Neither hides when you are active or how much you write.

What the server still sees

Encryption hides the content, not the traffic around it. The server, and so its operator, sees:

  • the IP address of each connection (above);
  • which connections are in the same room, by an id it cannot turn back into the link;
  • when messages arrive, how large they are and how many, which tells roughly when someone types;
  • how large each room is on disk and when it was last written.

Papyr logs only the first 8 characters of a room id, and no addresses (the admin API’s paths hold full ids). What that means for the operator’s logs and backups: operations.md, “What the server sees”.

Images

An image in a room (on a server whose operator turned images on, self-hosting.md, “Images”) is encrypted in your browser before it leaves, under a key derived from the room’s secret, like the text. The text holds only a reference to it. The server stores the encrypted file and sees:

  • the ciphertext: never the picture, its name or its type;
  • its size, to the byte (images are not padded, so a known picture’s size is visible);
  • when it arrived, and the id of the room it belongs to (every upload and download carries the room’s access key);
  • its id, which is a hash of the ciphertext, not of the picture.

In a sealed room the operator cannot decrypt an image, as with the text. In an open room the key comes from the room’s name, so the operator, who can try names, can decrypt its images as it can its text.

Only someone with the room’s link can fetch an image: the server checks the room’s access key on every upload and every download, and a bare address of an image gives nothing, not even the ciphertext. Images are removed with the room, when it expires or the operator removes it; the server cannot tell which images a text still names, so none is removed before its room is.

What it cannot protect you from

  • Whoever has the link. The link is the key. Everyone who has it can read the whole room, including what was written before they got it, and can edit or wipe it. A link in a chat, an email, a syncing browser history or a screen share is a copy of the key (of a password room, the key needs the password as well). There are no read-only links and you cannot take access back: make a new sealed room and move the text.
  • A dishonest server. It cannot read or forge your text, but it can drop messages, serve an older version of a room, or refuse to store. It also delivers the page that does the encryption, so a compromised server could serve one that leaks the key. This is true of every encrypted web app served by the party it protects you from; an installed client (the command line, downloaded from GitHub) does not have this weakness. Anyone can check what a server serves: papyr verify <server> compares every page and script it delivers with the list of hashes published with the release (cli.md, “Checking what a server serves”). A pass says what the server sent to the command line at that moment; it cannot prove what one browser received.
  • Your own device. An infected browser or machine sees what you see.

Authorship colours show every member who wrote what, under the name they chose, also after they left; More, “Clear authorship colours…” takes the names out. They are a convenience, not proof: any member can write under any name.

Compared with other tools

The table in the README compares Papyr with Etherpad, Google Docs, Proton Docs and CryptPad.