← All walkthroughs
How it works

Catching bad code

Every program has a fingerprint. Change a single character and the fingerprint changes completely. That simple fact is how bad code gets caught.

About 2 minutes · scroll to begin ↓
1

All of the code is public.

Every line of software that touches a ballot is published before an election. Anyone can read it.

count.js · public
function countBallot(ballot) {
if (ballot.mark === "A") totals.A += 1;
if (ballot.mark === "B") totals.B += 1;
}
2

Every program has a fingerprint.

Run the code through a fingerprint formula and you get a short code. Change anything, even one character, and the fingerprint comes out completely different.

Try it. This is real math, running in your browser right now.

count.js · public
function countBallot(ballot) {
if (ballot.mark === "A") totals.A += 1;
if (ballot.mark === "B") totals.B += 1;
}
Fingerprint (SHA-256)
…
3

Anyone can rebuild it.

Universities, newspapers, both parties, you: anyone can turn the public code into a program and check the fingerprint. Everyone gets the same one.

Approved fingerprint91a0…5c3e
  • State universitybuilding…
  • Local newspaperbuilding…
  • Party Abuilding…
  • Party Bbuilding…
4

Every machine reports its fingerprint.

Before accepting a single ballot, every machine proves which fingerprint it’s running, for its hardware, firmware, operating system, and software.

Precinct 12 · opening checkApproved 91a0…5c3e
  • Scanner 1checking…
  • Scanner 2checking…
  • Scanner 3checking…
  • Scanner 4checking…
5

Spot the bad one.

Scanner 3 is running something else. Maybe it was hacked, maybe someone swapped a file. Either way, it doesn’t match.

Precinct 12 · opening checkApproved 91a0…5c3e
  • Scanner 1checking…
  • Scanner 2checking…
  • Scanner 3checking…
  • Scanner 4checking…
6

What happens next.

The machine can’t take ballots. Everyone is alerted. It’s swapped for a certified spare, and the investigation is public.

If a mismatch shows up at closing instead, every paper ballot that machine read gets counted by hand.

  1. 1Machine can’t accept ballots
  2. 2Alert sent to every watchdog
  3. 3Swapped for a certified spare
  4. 4Investigated in public
The short version
  • ✓All election code is public for anyone to read.
  • ✓Anyone can rebuild it and get the exact same fingerprint.
  • ✓Every machine reports its fingerprint before it can take a ballot.
  • ✓A mismatch blocks the machine and alerts everyone, instantly.
Next · How it worksThe watchdog→