A binary is a claim about source code that arrives without its reasoning attached. You can read the repository, but you cannot easily see which commit produced the file you are about to run, or whether the compiler that made it was honest. Two strategies have emerged to close that gap, and they rest on different ideas about what trust means.

A signed artifact says a trusted party vouches for this file; a reproducible build says anyone can derive the same file and check the vouched-for one against it.

Signing answers who, not what

The conventional defense is to attach a cryptographic signature to the artifact. A builder holds a private key, signs a digest of the binary, and a verifier checks that digest against a public key or a certificate chain. Keyless systems such as Sigstore replace the long-lived key with a short-lived certificate issued after an identity check, and record the issuance in a transparency log so that misuse leaves a trace. Provenance attestations go further by describing the source repository, the build system, and the steps that ran, often in a format that can be verified against a policy.

All of this establishes a chain of custody, not correctness. If an attacker compromises the build machine and injects a backdoor, the builder will happily sign the poisoned output, because from its perspective that output is the real artifact. The signature is truthful and the software is malicious. Defenders respond by hardening the signing environment, moving keys into hardware, requiring two-person approval, and logging every issuance. Those measures raise the cost of an attack but keep the trust concentrated at a single point: whatever signs is what everyone believes.

The operational appeal is enormous. Registries support signatures, package managers can verify them with a flag, and developers already understand certificates. Nothing about the source or the compiler has to change, so adoption is mostly a matter of configuration. Frameworks such as SLSA organize these practices into levels, asking progressively harder questions about how source and builds are protected, while update frameworks such as TUF add mechanisms for key rotation and recovery after a key is lost. That maturity is why signed artifacts became the default answer for most ecosystems: there is a standard to implement and a tool that already speaks it.

What it takes to rebuild a binary twice

Reproducibility attacks the same problem from the opposite direction. Given the same source tree and a declared build environment, two independent builders must produce byte-identical output. Achieving that requires removing every source of accidental variation: build timestamps are pinned to a fixed value, file ownership and permissions are normalized, archive entries are sorted, and absolute paths are replaced with stable relative ones. Compilers must be pinned to exact versions, and the build must be hermetic, meaning it fetches nothing from the network that was not declared as an input.

The payoff is verification without trust. If a hundred volunteers rebuild a release and all of them obtain the same digest, a producer who claims a different digest is either mistaken or lying, and no signature is needed to prove it. Projects including Debian, Tor, and Bitcoin rely on this property, and it has caught real incidents where a build machine was altered to ship different bytes than the published source implied.

The difficulty is that modern builds are leaky. A dependency resolved to the latest patch version, a compiler embedding the current time, a debug path containing a home directory, or a parallel build with nondeterministic ordering will each produce a different file. A common first step is to set a source date epoch so every tool that wants the current time reads the same value, then to sort directory entries before packing them into an archive and to strip build paths from debug information. Each fix is small; the problem is the number of places where a build can consult the outside world. Fixing these takes sustained attention, and every new toolchain can reintroduce the problem. The result is a spectrum rather than a switch: some projects are fully reproducible, many are reproducible on one machine, and most are not reproducible at all.

A package downloaded fifty million times a month puts fifty million installations behind one signing key, while requiring agreement among five independent rebuilders makes a single compromised builder insufficient and confines most disputes to a hash comparison that costs a few CPU-minutes.

An everyday analogy: the bakery and the recipe

Suppose a bakery delivers a cake with a signed card from the head baker. The card proves the cake came from that bakery, and it is worth a great deal if the baker is trustworthy and had a good day. But if someone slipped something into the batter, the signature still accompanies the cake. Now imagine the bakery also publishes the exact recipe, down to the grams and the oven temperature, and a dozen neighbors bake it independently. If every neighbor produces the same cake, the card becomes unnecessary; agreement among independent kitchens is the evidence.

The analogy also explains why the industry has not abandoned signatures. Publishing a recipe that twelve kitchens follow exactly is demanding work, and most kitchens improvise. Until the recipe is precise, the signed card is the only practical assurance, and discarding it would leave people with nothing.

Layering the two defenses

The strongest arrangement combines them. A build system signs a statement that includes both the artifact digest and a description of the inputs, and independent verifiers rebuild from those inputs and compare their own digests. A mismatch becomes a public, specific failure: either the producer's environment was compromised or the verifiers' environment was. Investigators know what to compare, which is far more useful than a generic warning that a certificate was valid.

For teams choosing where to start, signing is the first rung because it is cheap and immediately verifiable. Reproducibility is the second rung and pays off when the project is distributed widely enough that others will bother to rebuild it. The first narrows the set of people who can ship a malicious binary; the second narrows the set of ways a malicious binary can hide.

Signed artifacts and reproducible builds are not alternative religions but two halves of a verification strategy, with signatures constraining who may speak and reproducibility constraining what may be said.

Supply-chain security is unlikely to ever rest on a single mechanism. It rests on making an attack require several independent failures at once, and on making each failure visible quickly enough to matter before the software reaches the people who depend on it.

SOL: HCqPmPJM3NVtS6YrmVaTZYnuP8XZ2PFgQZKT94VK1LkS
Creating this takes real effort — thank you for the support.