The modern answer to the threat of Bonus 1 ── shrink the seed, and check it with diversity
In Bonus 1 we saw Thompson's dark twin ── even if a compiler's source is clean, as long as you build with a descendant of a poisoned binary the Trojan survives, and trust hits bottom at "something you didn't make yourself." So are we helpless? No. Just as the hope of the main series (the self-hosting loop, the hand-carved seed) had a modern answer, this threat, too, has two powerful countermeasures ── 1. shrink the seed down to a human-readable size (Bootstrappable / Full-Source Bootstrap), and 2. double-compile with a compiler of a different lineage to cross-check (DDC). The grand finale of the chicken-and-egg "hope."
The heart of the problem in Bonus 1 was that "the first binary you have no choice but to trust is too big to inspect." Then ── just make that seed as small as you possibly can. The Bootstrappable Builds project minimizes the number and size of binaries that must be trusted. And its achievement is remarkable ── from a seed of just 357 bytes, called hex0, it builds up the entire GNU system from source alone (Full-Source Bootstrap).
On top of these 357 bytes, slightly larger tools build up, one by one, from source. In the figure below, climb from the seed to gcc, and on to the GNU system. It's a straight descendant of Episode 4's "everything from a small core" and Episode 9's "the bootstrap staircase."
In Episode 9 we saw that the first bytes were carved by human hands. Full-Source Bootstrap brings that back into the modern age ── if you shrink the seed you must trust down to 357 bytes, a human can actually read all of it by eye. The "binary you have no choice but to trust, and can't inspect" of Bonus 1 becomes a size that can be audited. The motto "the first egg was carved by hand" comes back to life as a practical matter of security.
The other answer goes in a different direction from shrinking the seed ── it's a method to verify a suspect compiler you already have, as-is. David A. Wheeler's Diverse Double-Compiling (DDC). The idea goes like this ── prepare a trusted compiler A of a different lineage from the suspect compiler X, compile the same source twice through it, and compare the result bit-for-bit with X's binary.
Here's the brilliance. Thompson's poison is in neither the source nor the different-lineage A (the poison lurks only in the lineage of X's binary). So the binary rebuilt via A is clean, and ── if X is poisoned, the rebuilt result and X disagree, and the poison is exposed. In the figure below, toggle X between "honest" and "poisoned," and watch the comparison fail only when it's poisoned.
For DDC to hold, the same source must yield the same binary ── reproducible builds. This is exactly the same idea as Episode 3's "verify by the bit-for-bit match of stage2 == stage3." Back then we said "a correct compiler produces the same output no matter what it's built with." DDC combines that with diversity, making it the verdict that "if it matches when rebuilt through a different lineage, the binary is faithful to the source."
The lesson of Bonus 1 was "you can't trust code you didn't completely create yourself." In reality, no one can make all of it. But the two strategies overcome that in practice ── shrink the scope of what you trust down to 357 bytes that a human can read through, and further cross-check with a diverse second compiler. Instead of "make all of it," it's "trust small, and independently confirm each other." The poison Thompson showed to be "undetectable in principle" became, now, detectable in principle.
(1) Even with the 357-byte seed, you're still trusting the kernel and CPU that run that hex0 (the hardware/microcode of Episode 10). Full-Source Bootstrap minimizes the software seed, but hardware trust remains a separate problem. (2) DDC assumes that "the different-lineage A is not independently poisoned (does not collude with X)." How to secure a fully independent A is a practical crux.
(3) Reproducible Builds is a large, ongoing effort, and not all software has reached it yet. (4) Guix's Full-Source Bootstrap, GNU Mes, stage0, and live-bootstrap are developing projects, and their composition and numbers change with the version (357 bytes is a representative example of a hex0-seed). The point is the direction: "make the seed you trust small and verifiable, and confirm it with diversity."
To the threat of Bonus 1 (even from clean source, if it's a descendant of a poisoned binary, the poison remains / trust hits bottom at something you didn't make), the modern age responds in two ways. 1. Bootstrappable / Full-Source Bootstrap: shrink the seed you trust down to hex0's 357 bytes, and build up hex → M2 → Mes → TinyCC → gcc → the GNU system from source alone. If the seed is human-readable, the "binary you couldn't inspect" of Bonus 1 can be audited. 2. Diverse Double-Compiling (DDC, Wheeler): double-compile with a trusted compiler of a different lineage, and compare the result bit-for-bit with the suspect binary. Since the poison is in neither the source nor the other lineage, only the contamination disagrees and is exposed.
DDC's foundation is reproducible builds = a descendant of Episode 3's "bit-for-bit match of stage2==stage3." This bonus shakes hands with the main series in three ways ── Episode 3 (bit-for-bit match), Episode 4 (everything from a small core), Episode 9 (the hand-carved seed). Deeply knowing the structure of bootstrapping became, as-is, the power to protect it. The poison Thompson showed to be "undetectable in principle" became detectable, by trusting small and confirming with diversity. ── The chicken-and-egg hope withstands the threat too.
Print / Save as PDF: ⌘+P (Ctrl+P on Windows). On screen, use the slider in Figure 1 for the build-up from the 357-byte seed to the GNU system, and the buttons in Figure 2 to try DDC (the comparison fails only when X is poisoned). Click "See the answer" to open each solution.