Your device encrypts a synced graph before uploading anything to Managed Sync, so the Sync Server stores and relays data it cannot read. Your devices decrypt what they receive and merge the edits themselves.

Signing in with your EtherPK Account proves who you are to the Sync Server but decrypts nothing, because no encryption key is made from your account password. Your notes are decrypted with your Encryption Keys: a security key pair of your own, and the Graph Key of each synced graph you belong to. The public half of your security key is published on the Sync Server so that other people can seal keys for you with it.

The Sync Server stores your Encryption Keys sealed. Only your Recovery Code or one of your unlocked devices can open them: the server cannot, and it never receives the Recovery Code. On a new device you unlock them once, with the Recovery Code or by approving the new device from an unlocked one, and they stay on it. If you lose the code and every unlocked device, nobody can decrypt your notes, EtherPK included.

This encryption hides your notes from the Sync Server. It does not hide them from the people you share a graph with or the extensions you install, and your own devices hold readable copies. Protected documents add a second layer, under a key only you hold.

Encryption on the device

Your device encrypts document text, page names, the graph's name and settings, images and files along with their names and types, and the cursors of people editing together.

EtherPK is source available, so you can read its code, encryption included, in the etherpk-client repository on GitHub. Encryption Details gives the algorithms, key sizes and formats.

Metadata on the Sync Server

To store your data and decide who can reach it, the Sync Server can see:

  • your email address, name and sign-in records, and the network address of each request
  • the random id, owner and members of each graph, with their roles, and the sender, recipient and date of each invite
  • document ids, and the size and time of each encrypted change
  • which devices are connected, and which documents each one has open
  • the size and upload time of each file

It cannot see document text or page names, graph names or settings, file names or contents, or any key that can decrypt them.

Sign-in and Encryption Keys

One Recovery Code covers all your synced graphs, including any you join later. Resetting your password or signing out leaves both the code and the Encryption Keys stored on the Sync Server unchanged.

If you lose your Encryption Keys, the way back is Reset Encryption Keys on the Sync tab of the Graphs page. Because you have no key by then, it needs only a sign-in, so anyone who can sign in as you can use it to delete your Encryption Keys and every graph you own.

New devices

When you approve a new device from an unlocked one, both screens show an approval code made from the one-time keys of both devices. Matching codes show that the Sync Server did not put keys of its own between them. Compare the codes before you select Approve on the unlocked device, because that sends your Encryption Keys at once, encrypted so that only the new device can open them. The new device does not use them until you select The codes match on it.

If someone might have seen your Recovery Code, use Replace Encryption Keys. It changes your Encryption Keys as well as the code, while Regenerate Recovery Code changes only the code. After a replacement you have a new security fingerprint, and every other device has to unlock again. See Recovery Code And Device Approval for more information.

Settings Vault

Each account that syncs a graph has a Settings Vault, which holds the settings that follow you between devices: your installed extensions, their settings, and the API keys for Agent Chat. It is sealed under the same key as your Encryption Keys, and the Sync Server cannot read it. Agent tokens never receive it either, so an agent signed in with the Headless Client can read your synced graphs but not your extension settings or API keys.

Shared graphs

A shared graph's members are its owner and its Players, the people the owner invited (see Sharing A Graph). Every member holds the graph's single Graph Key, so every Player can read and change everything in the graph apart from protected documents, which are hidden from them.

An invite carries the Graph Key, sealed to the invited person's security key and signed with the owner's. The Sync Server hands out the security keys that invites are sealed to, so compare security fingerprints with the other person, face to face or on a call you trust. Matching fingerprints mean the key is theirs, not one the server put in its place.

When you confirm a fingerprint, it is saved with your Encryption Keys, and all your devices then show that person as Verified. If the server later hands out a different key for them, the app shows Key changed and goes no further until you compare fingerprints again.

Departures and new Graph Keys

When the owner removes a Player, or a Player leaves, the Sync Server refuses them access at once. It cannot take back the keys or copies they already hold.

One of the owner's devices then creates a new Graph Key and sends it, sealed and signed, to each remaining member. Because only the owner's devices can do this, edits made after someone leaves keep using the old key until the owner next opens the Graphs page or the graph with their Encryption Keys unlocked.

Former members keep the older Graph Keys. Given the encrypted data, they could read anything written before the new key existed, even edits made after they left, but nothing written under the new key.

Copies and keys on devices

Each browser keeps a readable copy and a search index of every synced graph it has opened, for every account that has used it, so only the device lock protects them. See Where Your Data Is Stored for more information.

Your Encryption Keys stay unlocked on the device until you sign out, clear the site data, or remove this browser's copies of your synced graphs. Signing out locks the keys but leaves the readable copies behind, so before you leave a shared device, delete them with Remove under Synced graphs in this browser on the This Device tab. Removing them leaves your graphs on the Sync Server.

A device passcode encrypts the Encryption Keys kept on the device, not the documents already stored there. See Device Passcode for more information.

A Local Mirror (see Keeping A Local Copy Of A Synced Graph) and an export are readable Markdown copies too, though protected documents stay encrypted in both.

Protected documents

Protected Documents have a second layer of encryption under a protection key, and each person has their own protection key in each graph. Yours is locked under your passphrase and, if the graph is synced, kept with your Encryption Keys. The key that opens your Encryption Keys cannot open your protection key, so the Recovery Code cannot open a protected document or recover a forgotten passphrase. Nor can a copy of an unlocked device open one.

While a protected document is locked, it is hidden from the other Players and from anyone using your unlocked device, though anyone who opens the graph can still read its title in the frontmatter.

Extensions and agents

Extensions run inside EtherPK with no sandbox, so an installed extension can read and change the decrypted documents in the graphs you open, including protected ones while they are unlocked. It can also send what it reads to other websites.

The Headless Client is another device that holds your Encryption Keys and reads and writes your synced graphs, apart from protected documents.

Precautions

  • Compare security fingerprints with the people you share a graph with, and approval codes when you add a device.
  • Turn on two-factor authentication for your EtherPK Account, since a sign-in is enough to use Reset Encryption Keys.
  • Keep access tokens as safe as your password. A token cannot reset your Encryption Keys, but it can still reach your account and your sealed Encryption Keys.
  • Keep your Recovery Code safe.
  • Lock your devices.
  • Open EtherPK from its own address. It runs only scripts served from that address, and in browsers that support Trusted Types, document text cannot run as a script. See Running EtherPK On Your Own Device for more information.
  • Install only extensions you trust.
  • Remove people you no longer share a graph with.
  • If EtherPK warns that the server publishes a security key that is not yours, do not send or accept invites until the warning clears. See Troubleshooting for more information.
  • Report a security problem privately, through the route on Help And Community.