# Charter: user-chosen trust for Windows software*Working title. Status: outline, November 2026.*## GoalMake it possible to install software on Windows because **people you choseto trust reproduced it from source**, rather than because a publisherrented a code-signing certificate or built up SmartScreen reputation. Inshort: Nix's trust model, available to Windows users.A file should be trusted when:1. **It's reproducible.** Its hash follows from its source and build recipe,and anyone can rebuild it and get the same bytes.2. **Independent rebuilders agree.** At least *k* of the *n* rebuilders theuser picked (the developer, a distro, a company, people they know)signed that hash.3. **The user holds the trust roots.** The user chooses whose signaturescount, like Nix's `trusted-public-keys`. Microsoft's root program is oneoption among many, not the gatekeeper.4. **It's current.** A genuinely signed but old, vulnerable release can't bepassed off as the latest (rollback and freeze attacks).5. **It's public.** Every attestation is in an append-only log, so nobodycan quietly sign two different hashes for two audiences.## WhyWindows trust today is one root program (Microsoft's), reputation you payfor (Authenticode certificates and SmartScreen), opaque builds, andantivirus heuristics in place of proof. A concrete case: quine-global/hyper#176,where Bkav's machine-learning heuristic (`W32.AIDetectMalware`) flags Hyper'sunsigned Windows installers on VirusTotal. Nothing a user can do on their ownmachine changes that verdict: no local trust store and no package manager'shash pinning reaches the antivirus engines or SmartScreen.## Non-goals- Replacing Authenticode or SmartScreen, or changing how Windows itselfdecides trust. The client works alongside them.- Renting trust: no paid or CA-issued code-signing certificate, free ornot (SignPath Foundation included). Hyper's answer to #176 is thischarter's, not a certificate.- Writing a new Nix. Native Nix on Windows is upstream Nix's job (see[Prior art](#prior-art)); we contribute there rather than fork it.- Changing GnuPG. It answers "did this key sign these bytes?" and does thatwell. Freshness and transparency belong one layer up.## Prior art| What | Status | What we take from it ||---|---|---|| [Bitcoin Core's Guix builds](https://github.com/bitcoin/bitcoin/blob/master/contrib/guix/README.md) and [guix.sigs](https://github.com/bitcoin-core/guix.sigs) | In production | Reproducible Windows releases cross-built from Linux; many independent builders sign their hashes (`guix-attest`, `guix-verify`); Authenticode signatures attached reproducibly || nixpkgs `pkgsCross.mingwW64` | In production | Cross-compiling Windows binaries reproducibly from Linux || [libnix](https://nlnet.nl/project/libnix/) (NLnet, NGI Zero Core) and upstream Nix's Windows port | In progress | Native Nix on Windows; [Nix 2.34.0](https://discourse.nixos.org/t/nix-2-34-0-released/75818.md) notes continued work || [nova-nix](https://hackage.haskell.org/package/nova-nix) | Experimental | A separate Windows-native Nix; `C:\nix\store`, needs Developer Mode for symlinks || [TUF](https://theupdateframework.io/) | Mature (python-tuf, go-tuf, AWS `tough`) | Freshness, rollback and freeze protection, k-of-n role keys, key rotation || [in-toto](https://in-toto.io/) | Mature | Layouts (who may perform which build step, with thresholds) and attestations; Debian's `apt-transport-in-toto` experiment with rebuilders || [Sigstore](https://www.sigstore.dev/) (cosign, Rekor) and [Sigsum](https://www.sigsum.org/) | Mature / young | Transparency logs; Sigsum has independent witnesses that cosign its log || Debian's reproducible builds and rebuilderd | In production | Independent rebuilders as infrastructure |The gap: nobody has a **Windows client** that checks k-of-nrebuilder attestations against roots the user chose, with freshness and atransparency log, for any project.## ArchitectureThree pieces, which can progress independently:1. **Reproducible Windows builds:** Nix or Guix cross-compiling from Linux.The build machine needn't run Windows.2. **Attestations and distribution:** rebuilders publish in-toto attestations("from commit C I built H"). TUF metadata distributes the project'slayout, the rebuilder keys and the latest release, and makes them fresh.Every attestation also goes into a transparency log.3. **The Windows client:** given a file, it checks the attestations againstthe user's trust store and threshold, the TUF freshness metadata and loginclusion, then reports or installs. It's a single .exe with no GnuPG orPython.## Milestones### M0: Prototype client against Bitcoin Core (done)`bitcoin-verify`, in [quine-global/bitcoin, branch `windows-trust-verifier`](https://github.com/quine-global/bitcoin/tree/windows-trust-verifier/contrib/verify-binaries-rs).Rust, one 3 MB .exe. It pins builder fingerprints in its own trust storeand checks a release file against each builder's signed `all.SHA256SUMS` inguix.sigs with a threshold. It was tested on a real Windows machine againstthe 32.1 installer (genuine: pass; one byte changed: fail) and has 9 offlinetests on real attestations.What we learned: on its own, this does nothing GnuPG plus Bitcoin Core's`verify.py` can't. Its value is packaging (no Python, GnuPG or wget onWindows). It counts toward the goal only once it gains what GnuPG lacks:M2 and M3.### M1: Make the client project-agnostic (done)[quine-global/quorum](https://github.com/quine-global/quorum). It has a truststore per project (feed, source, threshold, pinned rebuilders) and two feeds:`guix-sigs` (OpenPGP, with a `bitcoin-core` preset) and `in-toto` (DSSEenvelopes holding in-toto Statements, with Ed25519 or ECDSA P-256 keys).`quorum keygen` and `quorum attest` cover the rebuilder's side.On Windows (runner-windows), the same `quorum.exe` checked the realBitcoin Core 32.1 installer against live guix.sigs, and a release of asecond project through an in-toto feed. The second project was a stand-inmade for the test; a real one is M4. There are 17 tests, and ECDSA P-256signatures made independently with LibreSSL verify. Interop with attestationsmade by cosign itself is still untested.### M2: Freshness and rollback protection (done)In quorum. A project's TUF repository signs one target, `release.json`,which says which release is the latest. Users pin its first root by SHA-256.`quorum check` follows the specification's client workflow (section 5): itwalks the root chain (rotation), checks role thresholds, lengths and hashes,and fails with `OUTDATED` (unless `--allow-old`), `FROZEN` (expiredmetadata) or `ROLLBACK`. `quorum tuf init | release | refresh | rotate-root`publish it.It's a minimal client of our own. awslabs' `tough` is async and needsaws-lc-sys, a C library that breaks the Windows cross-build. Tested in 7end-to-end cases, among them a correctly signed old release (`OUTDATED`) andthe whole repository replayed as it was (`ROLLBACK`). Not yet tested againstrepositories made by python-tuf or tuf-on-ci, nor run on Windows.### M3: Transparency (done)Off the shelf, with quorum as the client. The log is a self-hostable,static C2SP tlog-tiles log of attestations, not a public service:[Tessera](https://github.com/transparency-dev/tessera)'s `posix-oneshot`writes it, and [litewitness](https://github.com/FiloSottile/torchwood)witnesses cosign it over C2SP tlog-witness before a checkpoint ispublished. This is Sigsum's witness model with its ecosystem's own tools,without publishing anything to a public log. quorum reads it withCloudflare's `signed_note` and `tlog_tiles` crates: it counts anattestation only if it's logged, requires k of the pinned witnesses, andrefuses a log whose history changed since it last looked (`FORK`, by aconsistency proof). `quorum log monitor` reports a rebuilder signing twohashes for one file (`EQUIVOCATION`) and rebuilders disagreeing(`DISAGREEMENT`).Tested in 7 end-to-end cases against the real Tessera and two reallitewitnesses (pinned in quorum's flake), among them equivocation found bythe monitor and a rewritten history: refused by the witnesses, and caught bythe client even when colluding witnesses cosigned it. Waiting (notasking) for Cloudflare's next release of its crates: their main branch has`tlog_cosignature`, which would replace quorum's last log code, and nolonger pulls in `url`, which costs quorum 30 crates (Unicode data) in0.2.0. quorum moves to it once it's on crates.io. Open: inclusion proofs instead of reading every leaf hash; submitting topublic Sigsum or Rekor logs, which would publish data and so needs adecision.### M4: A second reproducible project for Windows (done for x64)- **Done: quorum itself.** `nix build github:quine-global/quorum/<commit>#windows`.It uses the official Rust toolchain and the Windows target's std (fenix),linked by zig, rather than `pkgsCross.mingwW64`, which would build a mingwGCC and a Windows rustc from source. At commit `21161095`, pulp (twice,`nix build --rebuild`) and runner-x86-linux got the same derivation andthe same `quorum.exe`:`ed426feea1487d925651a120b28cbc1e7ad51cd74661f29bdc3813c88c3a3574`. Thatfile passes a Bitcoin Core check on runner-windows. This also settles theclient's own bootstrapping: the verifier can be rebuilt and compared.Lessons: zig ships no `synchronization` import library (we generate onefor `api-ms-win-core-synch-l1-2-0.dll`), and nixpkgs' cargo-zigbuild needsa `dlltool` wrapper. Rebuilders should build from the published commit,not from copied files: macOS metadata files once changed the source hash(not the output).- **Hyper: done for x64, app and installer.** On branch`reproducible-windows` of quine-global/hyper, `nix build .#win-unpacked`(x64) gave the same derivation and the same 319 files on runner-x86-linuxand pulp, and a `--rebuild` found no difference. That Hyper.exe ran onrunner-windows and opened a shell through ConPTY. The native modules(node-pty's ConPTY parts, native-process-working-directory, native-reg)are compiled with zig, not MSVC: N-API is a C interface, linked against animport library naming Hyper.exe. Electron, its headers and electron-builder's NSIS plugins are pinned inputs, not rebuilt. ConPTY only and nocustom V8 snapshot, by decision.`nix build .#installer` makes the NSIS installer offline (NSIS fromsource, no Wine): runner-x86-linux and pulp built the same`Hyper-4.0.0-q-canary.25.exe` (`dcd686f6…`), and a `--rebuild` matched.It installs, runs and uninstalls cleanly on runner-windows. What it tookin electron-builder (patched in the flake, to propose upstream): read theuninstaller out instead of running Wine; build the NSIS header in a fixedorder; a fixed temporary folder name. And NSIS's SetDateSave off.- Since then: one installer for x64 and arm64, as releases are(`nix build .#windows`; arm64 untested on an arm64 machine), built inHyper's CI on every push ("Windows (reproducible)", which logs its hashes;its first runs matched pulp and the runner over SSH). From the next tag,releases carry it as `Hyper-<version>-reproducible.exe` with its`.SHA256SUMS`, beside the Windows runner's installer, which stays thedownload and the update (the update site skips `*-reproducible*`).- Open: winpty and the V8 snapshot, if wanted; independent rebuilders (M5).- Done when: two independent machines produce the same Windows hash. Donefor quorum and for Hyper (x64).### M5: Independent rebuilders- At least two parties not under one control rebuild each release andpublish attestations (in-toto, logged per M3).- Document how to run a rebuilder: hardware, keys, the expected work.- Done when: a release passes a 2-of-2 threshold with no shared keys ormachines.- **Done: the kit.** One command,`nix run github:quine-global/quorum#rebuild`, builds a release with Nix,builds it again (`--rebuild`: bit for bit the same, and the machine's own,not a binary cache's), signs the files' hashes with cosign (no publiclog) and, for the log's operator, logs it with Tessera. Guide:quorum's `docs/REBUILDER.md`. Tested end to end on a Linux runner withquorum.exe: rebuilt, signed, logged, and `quorum check` passed againstthat feed.- **Done: the feed**, [quine-global/attestations](https://github.com/quine-global/attestations),one folder per project (`hyper/`, `quorum/`), each with `builder-keys/`,attestations and `log/`.- Waiting: a release built by the flake (Hyper's next tag; none before`v4.0.0-q-canary.25` has it), and a second rebuilder not under ourcontrol.### M6: Windows experience- Explorer integration ("Verify with trusted rebuilders" on right-click).- A winget- or Scoop-style front end that installs only verified files.- Setting up the trust store without a terminal.### M7: Native Nix on Windows (contribute upstream)- Track libnix and upstream Nix's Windows port. Contribute where our workneeds it (likely store layout and DLL lookup), instead of starting our own.- **Tried, 2026-11-29:** stock NixOS/nix master (`db565067`, cross-builtfor MinGW, straight from cache.nixos.org) on real Windows 11 (ourrunner, not a VM image). It builds a derivation natively: `nix build--expr` with `cmd.exe` as the builder made`C:\ProgramData\nix\store\z2cz5hvk…-hello`, the same store path as[nix-windows-demo](https://github.com/nix-windows/nix-windows-demo)'spatched fork. Unit tests: libstore 820 passed; libutil 917 passed, 1failed (`canonPath.resolvesSymlinks`, a drive path read as `\C:`).What stock Nix can't do yet is read a `.nix` file(`BadFilename: cannot have a parent path: "C:\…\hello.nix"`), whichthe demo fork's unmerged path commits address. This answers thequestion John Ericson left on NixOS/nix#10822 (whether the demo workswith stock Nix); the reply to post there is drafted, not posted.## Open questions and risks- **The client's own trust.** quorum checks OpenPGP with GnuPG (onWindows, Gpg4win's or Git for Windows', found by itself), which took itfrom 218 crates to 127; the rest of its producer side is off the shelftoo (cosign, Tessera, litewitness, tuftool). What's left is the checkingitself: about 3,400 lines.- **Bootstrapping.** The client must itself be built reproducibly (M4) andverified once by other means; after that it verifies its own updates.- **Who rebuilds.** Rebuilders cost time and hardware. What makes M5sustainable?- **Key management for rebuilders:** expiry, rotation, compromise. TUF coverspart of it.- **Upstream appetite.** Bitcoin Core is dependency-averse and buildsreleases without Rust today. Showing the client is useful comes beforeasking them to ship it.## Related work in flight- **quine-global/hyper#176** (Bkav flags the unsigned installers). Nocertificate (see [Non-goals](#non-goals)): the answer is reproducibleinstallers with `SHA256SUMS` (M4, done), rebuilders' attestations (M5)and a public log of them (M3), which anyone, antivirus vendors included,can check.- **`verify.py` on Windows:** [quine-global/bitcoin, branch`verify-py-windows`](https://github.com/quine-global/bitcoin/tree/verify-py-windows).It drops the `wget` dependency and fixes the GnuPG status file on Windows.Not yet run to a full pass: the upstream `test.py` needs builder keys inthe GnuPG keyring, and fails the same way on unpatched master. Not yet runon Windows. A small, standalone upstream contribution; no PR opened.