veil

Why Veil is safe

Veil is built so that you never have to take its server’s word for anything. This page follows one change to a card from your browser into the public log and back, then says what Veil can’t protect you from.

Written on

The drawing shows your browser at the left, Veil’s server at the right and the public log along the bottom as a tape of cells. As you scroll, your browser carves a signet and presses it once. Only the impression travels to the server, and the signet never leaves the browser. Each new version is a sheet stamped with the same mark. It goes to the server and on into the log as a new cell, where a flag marks size 8. Five witnesses press their seals on the flag, and a second branch of the tape is struck out. Your browser then ticks the five stations and shows In good standing, and the command line and the log’s page tick the same five. At the end the server is hatched over: it holds an impression, and an impression cannot stamp. The Entry station turns grey and the verdict reads Status unknown.

The promise in one line#

You never have to trust Veil’s server. Whatever it tells you about a card arrives with signatures and proofs that your browser checks by itself, and the server holds nothing that would let it fake them.

The design assumes the server could one day be broken into or ordered to lie, and asks what would still hold. Each step below takes one more option away from it.

Your keys stay in your browser#

When you make a card, your browser creates a private key, a signet it keeps and presses to sign. No page can take it, Veil’s own included, because it is marked as not extractable. The server receives only the public key: the impression the signet leaves, which anyone can hold against a mark.

So the server can’t sign as you: it holds an impression, which can’t stamp anything, and has no way to get the signet. The chat gets its signatures from a small Veil page, the vault, which signs for the chat and nothing else, so the signet never reaches the chat either. The one exception is your backup file, which you download yourself. It holds a recovery key, encrypted with a passphrase the server never sees.

Every version of a card is signed#

A card changes in versions. Adding a phone, linking an account or revoking a lost device makes a new version, which your browser marks with the signet before it’s sent. Each version also carries the hash of the one before, so the versions form a chain back to the first.

If the server changed a name, added a key of its own or slipped in an account, the mark would no longer match the impression and the card would fail the check. The server stores your card and hands it out, but it can’t edit it.

Every version goes into a public log#

A signature shows who made a version. It doesn’t show that the server gave you the latest one, or the same one everyone else gets. So every version is also appended to a public log at log.veil.pub, where entries can be added but never changed or removed, not even by Veil.

The log is a Merkle tree. Every ten seconds it signs a short note, the checkpoint, stating its size and the hash at its root. An inclusion proof shows that an entry is in the tree, and a consistency proof shows that a newer tree still holds everything the older one did. Dropping or rewriting a change would break one of them.

Witnesses keep everyone on one history#

A log could still show one tree to you and another to everyone else. Witnesses stop that. They’re independent operators of the Witness Network, among them Google’s transparency team, Mullvad and Geomys, and each one cosigns a new checkpoint only after checking that it extends the last one it cosigned.

Your browser accepts a checkpoint only with at least two of their cosignatures. To show you a different history, Veil would need witnesses to cosign two trees that can’t both be true. An honest witness refuses, and one that signed both would have signed the evidence against itself.

Your browser checks all of it#

A card’s page shows the card at once and checks it in the background. It says “In good standing” only after the five stations you see on every card have passed:

  • Entry: the card’s current version, its signature and the log entry that holds it.
  • Inclusion: the hashes that lead from that entry up to the root of the tree.
  • Root: the tree’s size and root hash, as the checkpoint states them.
  • Signature: the log’s signature on the checkpoint, checked with the key in the log’s published policy.
  • Cosignature: the witnesses’ signatures on that same checkpoint, as many as the rule asks for.

If a station fails, the card says “Not in good standing” and shows which one. The server’s word never counts as a check. Your browser also remembers what it verified before, so a later answer with an older version or a different history fails too.

The same checks without a browser#

The veil command line checks a card on your own machine, with the same rules and verdicts as the page. The log’s key and the witnesses’ rule are built in, and it remembers the checkpoints it has seen, so a log that contradicts itself fails as a fork.

The log’s page at log.veil.pub does the same for the whole log: it checks the log’s signature, each witness’s cosignature, and that every new checkpoint extends the last one it saw. Anyone can run them without asking Veil.

What Veil can’t protect you from#

A compromised server would still have some room. This is what it could do today:

  • Stop answering, or answer slowly. Then no card checks out and you see “Status unknown”, but nothing false shows as good.
  • Show a card as it was a few minutes ago. The page accepts a checkpoint confirmed in the last 15 minutes and says “Last confirmed” with the time, so a change from those minutes may not show yet.
  • Leave out a change you asked for, such as the revocation of a lost device. Your own devices notice at their next visit, and so does “Check every version”, but a stranger checking your card meanwhile wouldn’t.
  • Fork the log for a newcomer. With the log’s key and two witnesses willing to sign, it could show someone who has never visited a different history. Anyone who remembers the real one (a browser, the command line, the log’s page) refuses it.
  • Serve altered code. A card’s page runs scripts that Veil’s server sends, and changed scripts could make it say anything. The command line, installed once, doesn’t depend on them.
  • See who looks up whom, and in the chat who writes to whom and when.

Planned: each release will publish a signed list of the files the browser runs, written into the log, so anyone can check the code they were served. It’s built but not yet in service. A production log will follow when the Witness Network opens a production list.

Questions#

What happens if Veil disappears?

You couldn’t look anyone up on veil.pub. What’s already written stays checkable while anyone keeps a copy of the log, which is plain files anyone can mirror. Your signet stays in your browser and your backup file stays with you.

What if someone steals my laptop or my browser?

Revoke its key from another of your devices, and its signatures stop counting from that version on. If the thief moves first, open your backup file in a new browser: its recovery key overrides every device.

What if a witness lies?

One witness can’t do much. A checkpoint needs at least two cosignatures, each checked against that witness’s public key, and a witness that cosigned two contradicting histories leaves signatures that prove it.

Can Veil read my chats?

Direct messages and groups of up to 20 people are encrypted end to end in your browser, so the chat server keeps only ciphertext, though it sees who writes to whom and when. Messages in a server’s channels are signed but not encrypted, as on any forum.

Why not a blockchain?

Veil needs one public history that nobody can rewrite. A transparency log gives that without mining, tokens or fees, and your browser checks an entry with a handful of hashes. Certificate Transparency has done this for web certificates for years.