QED

Run a witness

QED's runs happen on QED's machines. A witness repeats a run on a machine QED does not control, signs the result with its own key and sends it to QED. The run's page then shows the witness's result beside QED's, step by step and hash by hash, with the witness's name and key fingerprint.

Anyone can ask to be a witness. QED compares only runs signed by a registered key, and for now QED's operators register the keys. QED does not choose which runs a witness repeats, and it shows every comparison, whether it agrees or not.

How it works

  1. Make an Ed25519 key pair: qed-verify witness keygen --out witness.key. It prints your key_id and public_key. Keep witness.key to yourself.
  2. Ask for your key to be registered with the witness key form. Give the key_id and public_key, the name readers will see, and an optional URL. An operator registers the key and answers on the form.
  3. Pick a run on QED. Under "Independent runs" its page has two files: spec.json, what the run checked, and environment.json, the toolchain, packages, images and kernels it used. Write env.json for your machine: it names where the same toolchain, packages, exporter and kernels are on your machine. The verify image that environment.json names holds them.
  4. Run the same check and sign it: qed-verify witness run --env env.json --spec spec.json --key witness.key --out signed.json. It performs the same steps and records each step's verdict and each hash.
  5. Send the file as it is: curl --data-binary @signed.json -H 'content-type: application/json' https://qed.so/api/v1/witness-runs. QED checks the signature and compares your steps and hashes with its latest run of the same subject.

A witness that QED itself runs is labelled QED-operated on every page, so it is never mistaken for an independent one.

The format

The format is qed.witness-run/v1, written by qed-verify. A run signed by a key QED has not registered is refused with code unknown_witness, and the error says how to register the key. A run sent twice is refused with code duplicate.