# quorum Trust a file when **enough rebuilders you chose** reproduced it. Each project publishes, through a *feed*, what its rebuilders built: each rebuilder signs the hashes of the files they rebuilt from source. In your own trust store, you pin the rebuilders you believe (by key fingerprint) and set a threshold. A file passes when at least *threshold* pinned rebuilders signed its exact hash, and none of them signed a different one. It's a single executable (no Python), on Windows, Linux and macOS. OpenPGP feeds (Bitcoin Core's guix.sigs) are checked by GnuPG: `gpg` on PATH, else, on Windows, Gpg4win's or the one that comes with Git for Windows, which it finds by itself (or `$QUORUM_GPG`). Each check runs in an empty, throwaway GnuPG home, so nothing in your own keyring counts. in-toto feeds need nothing else. It's milestone M1 of [quine-global/charter](https://github.com/quine-global/charter): user-chosen trust for Windows software. ## Example: Bitcoin Core ``` quorum project add bitcoin-core --preset bitcoin-core quorum trust add achow101 --fingerprint 152812300785C96444D3334D17565732E08E5E41 --yes quorum trust add fanquake --fingerprint E777299FC265DD04793070EB944D35F9AC3DB76A --yes quorum trust add hebasto --fingerprint D1DBF2C4B96F2DEBF4C16654410108112E7EA81F --yes quorum check bitcoin-32.1-win64-setup.exe ``` ``` bitcoin-32.1-win64-setup.exe sha256 d4cc64d500fa7713b5e2f3b9d46a215def3c4ed91aa46bf13e4de1a042bf9aa2 bitcoin-core 32.1, attestations from https://raw.githubusercontent.com/bitcoin-core/guix.sigs/main achow101 OK signed 2026-10-27 fanquake OK signed 2026-10-27 hebasto OK signed 2026-10-27 PASS: 3 pinned rebuilder(s) reproduced this exact file (threshold 3). ``` Without `--fingerprint`, `trust add` shows the key and asks. Check the fingerprint somewhere other than the feed (the rebuilder, their website, a key you already hold): pinning means trusting what they sign. ## Example: your own project Rebuilders sign with [cosign](https://github.com/sigstore/cosign) (in `nix develop`): a key once, then for each release they rebuild, quorum writes what they're vouching for and cosign signs it: ``` cosign generate-key-pair --output-key-prefix keys/alice # keys/alice.key (secret), keys/alice.pub cosign signing-config create --out offline.json # once: no public log, no timestamp server quorum statement --release 1.0 --out statement.json hello-1.0.exe cosign attest-blob --statement statement.json --key keys/alice.key \ --signing-config offline.json --bundle feed/1.0/alice/attestation.sigstore.json ``` The empty signing config keeps the attestation private: without it, cosign also publishes it to Sigstore's public Rekor log. quorum checks the signature against the keys you pinned either way, not Rekor or certificates. The project publishes the feed (a git repo, a web server, a shared folder): ``` feed/ builder-keys/alice.pem (keys/alice.pub) builder-keys/bob.pem 1.0/alice/attestation.sigstore.json 1.0/bob/attestation.sigstore.json ``` Users: ``` quorum project add hello --feed in-toto --source https://example.org/feed --release-prefix hello- quorum trust -p hello add alice quorum trust -p hello add bob quorum trust -p hello threshold 2 quorum check -p hello hello-1.0.exe ``` ## Feeds | Feed | Layout | Signatures | |---|---|---| | `guix-sigs` | `//all.SHA256SUMS{,.asc}` (else `noncodesigned.*`), keys in `builder-keys/.gpg`: Bitcoin Core's [guix.sigs](https://github.com/bitcoin-core/guix.sigs) | OpenPGP, detached | | `in-toto` | `//attestation.sigstore.json` (a Sigstore bundle, as `cosign attest-blob --bundle` writes) or `attestation.dsse.json` (a bare envelope), keys in `builder-keys/.pem` | [DSSE](https://github.com/secure-systems-lab/dsse) envelopes holding [in-toto Statements](https://github.com/in-toto/attestation) | For `in-toto`, a rebuilder's key is an SPKI PEM public key: ECDSA P-256 with SHA-256, DER or raw signatures (what cosign makes), or Ed25519. Its fingerprint is the SHA-256 of the key's DER encoding, which is what the PEM file holds in base64, so anyone can check it without quorum: `grep -v -- ----- key.pem | base64 -d | sha256sum`, or `openssl pkey -pubin -in key.pem -outform DER | sha256sum` (Ed25519 needs OpenSSL 1.1.1 or later; macOS's LibreSSL can't read it). Any in-toto Statement counts, whatever its predicate (SLSA provenance, say): what matters is its subjects, the file names and their SHA-256. Statements from `quorum statement` also carry the release (`https://quineglobal.com/quorum/rebuild/v0`), and an attestation moved to another release's folder is refused (`WRONG RELEASE`). ## Results, per rebuilder | Result | Meaning | Counts | |---|---|---| | `OK` | Their signed attestation lists this file with this hash | yes | | `MISMATCH` | They signed a **different** hash for this file | fails the check | | `BAD SIGNATURE` | Not signed by the key you pinned (names the key that did sign, and whose it is if you pinned it for someone else) | no | | `WRONG RELEASE` | Their attestation is for another release | no | | `EXPIRED KEY` | OpenPGP key expired since | only with `--allow-expired`, if signed before the expiry | | `REVOKED KEY` | OpenPGP key revoked | never | | `NOT LISTED` | Their attestation doesn't include this file | no | | `NO ATTESTATION` | Nothing from them for this release | no | Exit codes: 0 pass, 1 fail, 2 error. ## The trust store ``` /projects//project.toml feed, source, release_prefix, threshold, pinned rebuilders /projects//keys/.key each rebuilder's key file, as fetched when pinned ``` `` is `--home`, `$QUORUM_HOME`, or `%APPDATA%\quorum` (`~/.config/quorum` on Linux, `~/Library/Application Support/quorum` on macOS). Checks use the cached key files, never what the feed serves later, so a change to the feed's keys can't add or swap a key you trust. `trust refresh` takes in new expiry dates, subkeys and revocations, and only while every pinned fingerprint is still there. A key can be pinned for one rebuilder only: the threshold counts keys, so it can't be met twice by one key. ## Building ``` cargo build --release cargo test ``` For Windows, from macOS or Linux, with [cargo-zigbuild](https://github.com/rust-cross/cargo-zigbuild): ``` rustup target add x86_64-pc-windows-gnu cargo zigbuild --release --target x86_64-pc-windows-gnu ``` The tests need the producer-side tools too (cosign, Tessera, litewitness, tuftool, GnuPG): `nix develop -c cargo test`, or `nix flake check`. On Windows, HTTPS goes through SChannel and the Windows certificate store; elsewhere through rustls. TLS only protects the download: trust comes from the signatures. ## Freshness: is this the latest release? Rebuilders' signatures say a file is genuine, not that it's current: an old release with a known hole stays genuinely attested forever. A project can also publish a [TUF](https://theupdateframework.io/) repository whose one target, `release.json`, says which release is the latest. Its timestamp is signed again daily, so a server that stops updating, or replays old data, gets noticed. The repository is made with [tuftool](https://github.com/awslabs/tough/tree/develop/tuftool) (awslabs' tough, which Bottlerocket's updates use), pinned in `flake.nix`. Keys are Ed25519, PKCS#8: PEM for `quorum tuf refresh`, DER for tuftool. The project, once (keep the root key offline): ``` for r in root targets snapshot timestamp; do openssl genpkey -algorithm ed25519 -out keys/$r.pem # OpenSSL 1.1.1+, not LibreSSL openssl pkey -in keys/$r.pem -outform DER -out keys/$r.der done tuftool root init root.json && tuftool root expire root.json 'in 52 weeks' for r in root targets snapshot timestamp; do tuftool root set-threshold root.json $r 1 tuftool root add-key root.json -k keys/$r.der --role $r done tuftool root sign root.json -k keys/root.der echo '{"release":"1.0"}' > in/release.json tuftool create --root root.json -k keys/targets.der -k keys/snapshot.der -k keys/timestamp.der \ --add-targets in --outdir tuf --targets-version 1 --snapshot-version 1 --timestamp-version 1 \ --targets-expires 'in 12 weeks' --snapshot-expires 'in 2 weeks' --timestamp-expires 'in 1 day' sha256sum tuf/metadata/1.root.json # users pin this; publish it on your website too ``` For each release, `tuftool update` with the new `release.json`, the same keys and each version one higher (plus `--metadata-url`). Root rotations: `tuftool root bump-version`, `add-key`/`remove-key`, `sign` with the new root key and `--cross-sign` with the old, then `tuftool transfer-metadata`. Daily (cron, CI), the timestamp is signed again. tuftool re-signs every role at once, which would put the targets key (it decides what's the latest) on the machine running the job; `quorum tuf refresh` re-signs only the timestamp (and with `--snapshot-key`, the snapshot): ``` quorum tuf refresh tuf/metadata --timestamp-key keys/timestamp.pem # daily; add --snapshot-key keys/snapshot.pem weekly ``` Publish the `tuf/` folder (`metadata/`, `targets/`). Users add it to the project: ``` quorum project add hello --feed in-toto --source https://example.org/feed \ --release-prefix hello- --tuf https://example.org/tuf --tuf-root-sha256 ``` From then on, `quorum check` first updates the TUF metadata, following the specification's client workflow: it follows root key rotations (tuftool's), checks every role's signature threshold, lengths and hashes, and refuses: - `OUTDATED`: the file is from a release that isn't the latest (`--allow-old` checks it anyway, on purpose); - `FROZEN`: expired metadata; - `ROLLBACK`: versions lower than ones it has seen; - signatures from keys the role doesn't have, and roots the trusted root didn't sign. Supported: Ed25519 and ECDSA P-256 keys, consistent snapshots or not, top-level targets only (no delegations). The tests (`tests/tuf.rs`) make the repository with the real tuftool, rotation included. python-tuf and tuf-on-ci write the same layout but haven't been tried. ## Transparency: the same story for everyone A rebuilder could sign one hash for most people and another for a target. With a transparency log, an attestation counts only if it's in an append-only log that everyone sees, so a second hash would be there for anyone to find. The log is a standard [C2SP tlog-tiles](https://c2sp.org/tlog-tiles) log: static files any web server or git repo can serve. quorum doesn't write it or witness it; off-the-shelf tools do, pinned in `flake.nix` (`nix develop` has them): - [Tessera](https://github.com/transparency-dev/tessera)'s `posix-oneshot` writes the log and signs its checkpoints. - [litewitness](https://github.com/FiloSottile/torchwood/tree/main/cmd/litewitness) witnesses it: Tessera sends each new checkpoint to the witnesses ([C2SP tlog-witness](https://c2sp.org/tlog-witness)), each checks it extends the last one it saw and cosigns, and the checkpoint is published only once enough have. ``` checkpoint signed note (C2SP tlog-checkpoint), plus witness cosignatures (C2SP tlog-cosignature) tile// the Merkle tree's hashes (RFC 6962), 256 a tile tile/entries/ the entries, each one attestation as canonical JSON ``` The log operator, once: ``` quorum log keygen --origin example.org/hello-log --out log.key # prints the log's verifier key ``` (`log.key` is in Go's note format, which Tessera reads.) Each witness, once, adds the log to its database (`witnessctl add-log -origin example.org/hello-log` and `witnessctl add-key -key `) and tells the operator its own verifier key, which litewitness prints on start. For each attestation, the operator writes an entry, then has Tessera log the batch, with the witnesses in a [policy file](https://git.glasklar.is/sigsum/core/sigsum-go/-/blob/main/doc/policy.md): ``` quorum log entry --rebuilder alice --release 1.0 feed/1.0/alice/attestation.sigstore.json --out new/alice # guix.sigs: … all.SHA256SUMS --signature all.SHA256SUMS.asc posix-oneshot --storage_dir log --private_key log.key --entries 'new/*' --witness_policy_file policy ``` ``` # policy witness w1 https://w1.example/ witness w2 https://w2.example/ group both all w1 w2 quorum both ``` Serve the log directory, except `.state/` (Tessera's own). Users add the log to the project: ``` quorum project add hello … --log https://example.org/log --log-key \ --witness --witness # --witness-threshold: default all ``` `quorum check` then verifies the checkpoint (the log's signature and the witness threshold), that the log extends the one it saw last time (a consistency proof, else `FORK`), and reads every leaf hash, each checked against the signed root. A rebuilder's `OK` counts only if their exact attestation is in the log (else `NOT LOGGED`). A `MISMATCH` fails the check either way. `quorum log monitor` reads every entry, verifies the ones by your pinned rebuilders, and reports `EQUIVOCATION` (a rebuilder signed two hashes for one file), `DISAGREEMENT` (rebuilders differ about a file) and `MISLABELLED` (an attestation logged under another release). Notes, checkpoints, tiles and proofs are Cloudflare's [`signed_note` and `tlog_tiles`](https://github.com/cloudflare/azul) crates; quorum adds cosignature/v1 witness keys, which they don't publish yet. The tests (`tests/tlog.rs`) run against the real Tessera and two real litewitnesses. Clients still read every leaf hash, so a check costs 32 bytes an entry (3 MB at 100,000); inclusion proofs would need the entry's index. ## Reproducible: rebuild quorum.exe yourself `quorum.exe` builds byte for byte the same on any Linux machine with Nix: ``` nix build github:quine-global/quorum/#windows sha256sum result/bin/quorum.exe ``` It uses the official Rust toolchain with the Windows target's standard library (fenix, pinned by `flake.lock`), linked by zig, with the crates vendored from `Cargo.lock` and build paths remapped. At commit `21161095`, two machines (and one of them twice, `nix build --rebuild`) got `ed426feea1487d925651a120b28cbc1e7ad51cd74661f29bdc3813c88c3a3574`, and that exact file passes a Bitcoin Core check on Windows. At `7056b79d` (the log on Tessera's tiles), one machine twice got `43d0617e5664300154c29b5eeb63980ab03f1482ffbdd17a9d29d216edde8b14`. So the verifier can be verified the same way: rebuild it, compare, and trust it once enough people you trust got the same hash. ## Rebuilders To rebuild releases and attest them: [docs/REBUILDER.md](docs/REBUILDER.md), one command (`nix run github:quine-global/quorum#rebuild`). ## Not yet (see the charter) - **Attested releases of quorum (M5).** Rebuilders don't publish signed attestations of quorum's own builds yet. - One person could pin two keys under two names; pin people you know are distinct. - Tested against: Bitcoin Core 32.1 and 22.0 (guix.sigs), attestations signed by cosign 3.1.6 (the tests, from the flake), ECDSA P-256 signatures made with LibreSSL, on macOS and Windows.