Guide · site 209 · wave 10 — Secrets
How VERNAM was made.
A daylight bureaucracy of secrecy: a numbers transmission arrives on a log sheet, a carbon-violet one-time pad lines up beneath it, and mod-10 subtraction resolves a courier's dispatch letter by letter. The page's single job is to show the only provably unbreakable cipher doing its arithmetic — and leaking the moment its sheet is used twice.
Concept
Wave 9's morse owns the nocturnal amber radio room, so VERNAM is deliberately its opposite: an East-bloc desk at two in the afternoon. No thriller lighting — cigarette paper, rubber stamps, ruled forms, and a small speaker that is off until you switch it on. The audience is anyone who has heard of numbers stations; the page shows what happens on the receiving desk, honestly enough that every digit can be checked by hand.
Palette
Per the wave's ink/line rule the violet is a mark, not a text colour — though at
5.1:1 on this light ground it happens to clear 4.5:1, so key digits stay violet even at small
sizes. Small red text uses a darkened #A03329 (5.6:1); the brighter stamp red is
reserved for large, bold, rotated stamps.
Type
Schibsted Grotesk carries the page voice — a sturdy northern-European grotesque that reads like a state form without drifting into DIN cliché. Cutive Mono sets every figure: it is a typewriter face, and everything on this desk was typed once — cipher groups, key groups, worksheet, ledger. Display bravery lives in the 82px headline and the 58px cipher group of the perfect-secrecy demo.
Techniques
Vanilla single file — DOM, SVG data-URI grain, one canvas, WebAudio. No libraries.
The signature: the pad doing mod-10 arithmetic
The engine is honest end to end. The dispatch (COURIER MET. PARCEL AT KIOSK NINE. BURN THE SHEET) is encoded through a real straddling checkerboard — mnemonic A T · O N E · S I R, eight high-frequency letters at one digit, the rest behind a 2- or 6- prefix — into exactly 55 digits, 11 five-digit groups. A key stream is drawn per cycle from a seeded PRNG (a stand-in for the pad factory, declared here), ciphertext is plain + key mod 10, and the page then performs the reverse subtraction live: digit by digit, a red +10 borrow mark wherever received < key, checkerboard chips resolving digits to letters, including two-digit codes that straddle a group boundary and visibly carry over. When the sheet burns at the end of a cycle, a fresh key re-encrypts the same dispatch into entirely different groups — perfect secrecy performing itself on loop. A rAF state machine steps print (150 ms/digit), key reveal (420 ms), subtraction (230 ms/digit) and decode (280 ms/letter); the rest state fast-forwards five groups so the desk is already mid-work at first paint.
WebAudio, built around the autoplay policy
The rest state is silent-visual: no AudioContext exists until the SPEAKER button
receives a real gesture. Only then is the graph built — a looped band-passed noise bed
(1400 Hz, Q 0.6) for shortwave air, a sine blip per printed digit at
480 + 48·digit Hz, and a four-note triangle interval chime
(E5–G5–A5–E5) at each new sheet. The context suspends when the tab hides.
The VENONA leak, measured
Two archival-length cables are encoded through the same checkerboard (1,322 and 1,251 digits; the difference stream runs over N = 1,251 pairs). With pad discipline each cable gets its own key and A − B mod 10 is statistically flat. With the reuse switch thrown, both share one key stream, the key cancels out of the difference, and plaintext structure survives into it. Nothing is scripted to "look leaky" — the histogram, coincidence rate and χ² are computed from the streams at load:
| Statistic | Fresh sheet | Reused sheet |
|---|---|---|
| coincidence κ (uniform 0.100) | 0.084 | 0.130 |
| χ² vs uniform, 9 d.f. | 11.7 | 28.2 |
| verdict line (1% level) | 21.67 — literature critical value | |
The perfect-secrecy demo is equally checkable: for each five-letter candidate
the page computes key = received − candidate mod 10 and shows the re-encryption landing
back on the intercept. A state probe (window.__vernam) exposes digits, key, cipher,
engine state and both VENONA datasets so QA asserts on state, not wall-clock.
Iteration log
Pass 1 — CraftSPACING · TYPE · CONTRAST
- Log groups jittered as digits typed in — the group slot's
min-widthwas a hair under five spaced Cutive digits; widened 5.4ch → 5.8ch so the dotted rules hold still. - Rendered-screenshot read caught two form defects: empty borrow-row cells were printing placeholder dots above the received digits (suppressed), and the secrecy worksheet's small-caps labels overran their 9.5ch column into the values — widened to 12ch and shortened "Key needed" to "Key".
- Contrast audit on the light ground: small red text demoted to the darkened
#A03329ink (5.6:1); labels 5.9:1, violet figures 5.1:1, body copy ~12:1.
Pass 2 — DepthSIGNATURE · SECOND READ
- Drove the arithmetic end-to-end headlessly: subtracted every cipher group against the pad and asserted the checkerboard decode reproduces the dispatch exactly — including the two-digit codes that straddle group boundaries, which now show a dashed "carries to next group" chip.
- Driving the reuse switch surfaced an unplanned truth: both cables open with the stereotyped heading TO CENTRE FROM — fifteen identical digits — which burns through a shared key as a run of zeros in the difference stream. At three displayed groups it looked like a rendering bug; widened the strips to five groups so the run visibly ends, and captioned it as the crib it historically was.
- Second-read detail: the burn cycle draws a fresh key sheet, so returning viewers find the same dispatch arriving as completely different groups — the pad note calls it out after the first burn, and the sheet serial climbs from Nº 0447.
- Micro-interaction: checkerboard cells highlight on hover and carry their code as a tooltip (H = 25); each decode flashes the cell it read.
Pass 3 — Hardening375 · MOTION · FAILURE PATH
- Drove the failure path: threw the reuse switch headlessly and asserted χ² actually crosses the 21.67 line (28.2 > 21.67 > 11.7) and κ rises 0.084 → 0.130. The first cut of the cables was too short — χ² read 13.9, under the line — so both cables were lengthened to archival size until the leak is genuine, not narrated.
- Headless SwiftShader runs rAF at a crawl, which stalled the desk under QA — the driver now catches up with multiple micro-steps per slow frame, and the liveness assert gates on the engine's state tuple, never wall-clock.
- Verified 375px on both pages (no horizontal scroll, wordmark and nav inside the viewport), reduced-motion freezes the desk mid-subtraction with borrow marks showing, and the histogram redraws through a DPR-capped resize.
- Chanel rule: removed the page-edge vignette — the paper grain was already doing the
work. Confirmed no
AudioContextexists before the first gesture and none of the headless runs log an autoplay violation.
Honest numbers
- Dispatch: 55 plaintext digits, 11 groups; keyspace for this transmission 1055.
- Vernam's patent filed 1918, granted July 1919; Mauborgne's never-reuse condition c. 1919; Shannon's perfect-secrecy proof published 1949.
- VENONA figures hedged to "by most accounts": duplicated pad pages in 1942, roughly three thousand messages read across 1943–1980.
- All χ², κ and histogram values on the page are computed from the encoded streams at load, never hard-coded.