Home › Ciphers › VIC Cipher

VIC Cipher

The VIC cipher is the summit of hand cryptography: the system used by Soviet illegal Reino Häyhänen — codename VICTOR, hence the name — in 1950s New York, and described by David Kahn as the most complex pencil-and-paper cipher known to have been used by an agent. From four small secrets — a phrase, a date, a personal number, and a five-digit keygroup sent hidden inside the message itself — it manufactures a straddling checkerboard and two transposition keys by chain addition, then runs the message through all three. Nothing here is approximated: the engine below reproduces both published worked examples digit for digit — the schedule, the checkerboard stream, both transpositions and the transmitted form — and this page shows the whole derivation for the loaded example so every stage can be checked by hand.

In short

The VIC cipher derives everything from a memorised phrase, a date, a personal number and a random five-digit keygroup: chain addition stretches the keygroup into a full key schedule; the schedule builds a straddling checkerboard (letters to one or two digits) and keys for two columnar transpositions, the second disrupted by a triangular pattern. The keygroup travels inside the ciphertext, at a position named by the date's last digit. Spaces are not enciphered.

Named for VICTOR, Reino Häyhänen's codename; the direct descendant of the Soviet straddling-checkerboard tradition.

Encode or decode — the published example's secrets are loaded

55 characters
Encoded · VIC · keygroup hidden 5 groups from the end
96658 86791 06602 58887 06408 39604 09151 05508 05865 69555 04957 78785 60078 36796 95036 03789 72401 61329 36865 65780 02001

Schedule: C 69592 · checkerboard key S 5961328470 · transposition widths 13 and 6 · the keygroup 72401 sits 5 groups from the end, where the date's last digit (5) put it

Everything runs in your browser — nothing is uploaded. On decode the keygroup is read out of the message; the field is ignored.

How it works

Four secrets in, a machine out

The schedule. Call the keygroup A and the date's first five digits B. C is A minus B, digit by digit without borrowing. The phrase's first twenty letters are converted to two ten-digit sequences E by ranking (smallest letter = 1, ties taken left to right, 0 last). Chain addition — each new digit the sum, mod 10, of the pair a fixed distance back — stretches C to ten digits (F); F added to the first E sequence gives G; G permutes the second E sequence into H; H is ranked into J and chain-extended to a fifty-digit block in five lines of ten. The block's first two lines, reduced by the personal number, give the two transposition widths a and b; the last lines of the block give the two transposition keys Q and R. H, ranked once more by a second ranking pass, gives S — the checkerboard's key. Every number in that paragraph is printed for the loaded example in the Reference below; the derivation is long, mechanical, and entirely checkable, which is the point of printing it.

The checkerboard. S orders the board's columns. The eight commonest letters — the mnemonic row A T · O N E · S I R — take single digits; the remaining letters, the digits' companions and the full stop fill two further rows under the two leftover column digits, taking two-digit codes. A digit in the plaintext travels by the figure shift: the board's "/" code, the digit written twice, and the "/" code again — 0500 becomes 80 00 55 00 00 80 — and this tool performs that routine exactly, which is why a typed "/" is refused by name: the slash is the shift symbol itself, not a letter of the message.

The transpositions. The digit stream is padded to a multiple of five with the first digits of the block's first line (recognised and stripped on decode), written under key Q for a plain columnar transposition, then under key R for the disrupted one: the second grid is filled row by row, but a triangle of cells starting under the first-read column — stepping one column later each row, then a gap row, then the next triangle — is skipped on the first pass and filled last. The keygroup is then inserted into the five-digit groups at the position the date's sixth digit names, counted from the end. In service, the agent first bisected his draft — wrote the message in two halves and interleaved them — before enciphering; the tool does not perform the bisection, because it is an operator precaution, not part of the cipher, and the published examples' arithmetic is what this page pins.

Origin & history

The hollow nickel

In 1953 a Brooklyn newsboy dropped a nickel that split open: inside was a microfilm of meaningless five-digit groups. The film reached the FBI, and the cipher defeated them until 1957, when the man it belonged to — Reino Häyhänen, Soviet illegal, codename VICTOR — defected and explained his system. Kahn's account in The Codebreakers made VIC the canonical summit of agent hand-ciphers, and the published worked example (phrase "'Twas the night before Christmas", date written bare as 139195, personal number 6, keygroup 72401) is the one this page's tool is pinned to. A second full worked example, published by John Savard from the same tradition, pins the disrupted transposition independently; the engine reproduces both completely. The system's lineage is the Soviet straddling-checkerboard family — the same board that served the Spanish Civil War and, in simplified form, many resistance networks — raised by chain addition and disruption to a complexity no earlier hand system reached.

Reference

The loaded example's full schedule

A · keygroup72401
B · date, first five13919
C · A − B (no borrowing)69592
E · phrase rankings8017942653 / 6013589427
F · C chain-added6959254417 …
G · E₁ + F4966196060
H · E₂ permuted by G3288628787
J · ranking of H3178429506
Block · H chain-extended5064805552 / 5602850077 / 1620350748 / 7823857125 / 5051328370
Widths a, b13 and 6 (first block lines + personal number 6)
Q · transposition 1 key0668005552551
R · transposition 2 key758838
S · checkerboard key5961328470
CheckerboardColumns 5 9 6 1 3 2 8 4 7 0 · top row A T – O N E – S I R · row 6: B C D F G H J K L M · row 8: P Q U V W X Y Z . /

Every line of that table is an output of the shipped engine on the loaded secrets, and each matches the published example (Kahn's, as reproduced in the CIA's historical monograph) exactly — the build suite asserts all of them. The checkerboard reads: A is 5, T is 9, O is 1, N is 3, E is 2, S is 4, I is 7, R is 0; B is 65, C is 69, the full stop is 87, and so on — the frequent letters cost one digit, the rest cost two, which is the straddling board's whole economy.

Worked examples

Two published examples, one engine

Example 1 — the Kahn/CIA example: the schedule and the stream

Phrase "'Twas the night before Christmas" · date 139195 · personal 6 · keygroup 72401

The published example enciphers a bisected situation report; its checkerboard stage produces a specific 99-digit stream, and the engine's board, fed the same bisected text, produces that stream digit for digit — the strongest single check a VIC implementation can pass, since the stream depends on the schedule, the board layout and the digit-handling all at once. (The slashes printed between the bisected text's segments are join markers in the publication, not enciphered characters.) The schedule table above is the same example's other half.

Example 2 — Savard's example: both transpositions, end to end

Phrase "I dream of Jeannie with t" · date 741776 · personal 8 · keygroup 77651

John Savard's worked example publishes the full journey: a 149-digit checkerboard stream, the plain transposition, the disrupted transposition, and the transmitted groups with the keygroup inserted sixth from the end. The engine reproduces every stage digit for digit — including Savard's single appended null digit before the first transposition. One discrepancy is disclosed, not smoothed: Savard's printed stream runs four digits short of his own printed message, because his stream omits the message's two full stops; Kahn's example enciphers full stops (the board has a cell for them), and so does this tool.

Example 3 — the loaded tool run

ATTACK AT DAWN. BY DAWN I MEAN 0500. NOT 0915 LIKE YOU DID LAST TIME. → 96658 86791 … 72401 … 02001

Run live above: the published example's secrets on an un-bisected message. The output is this tool's alone — no publication prints it — and it is pinned in the build suite so the shipped page can never drift from the shipped engine. Find the keygroup: fifth group from the end, exactly where the date's last digit sent it. Decode returns the message with its spaces removed, as the system always did.

Breaking it

Why VIC held

VIC defeated the FBI's cryptanalysts for four years with the ciphertext in hand, and yielded only to its operator's defection. The reasons are structural: the checkerboard destroys letter-frequency shape (frequent letters cost one digit, so digit frequencies flatten); the chain-added schedule means no two messages share keys even under the same phrase and date, because the random keygroup reseeds everything; and the disrupted transposition breaks the column regularities that anagramming feeds on. The known attacks are the generic ones — depth (two messages under one keygroup, which procedure forbade), operator error, and the human channel that actually ended it. As a hand system it has no serious rival; its cost was an operator who could execute an hour of error-free arithmetic under pressure, which is why it belonged to trained illegals and to no one else.

  • Security status: the strongest known agent hand cipher — unbroken in service; yielded to defection, not analysis.
  • What protects it: per-message keys from the random keygroup, frequency flattening, and disruption.
  • The working order: there isn't one, short of depth or the operator — which is the historical verdict, not a boast.
Variants

The checkerboard family

RelativeHow it differsSolve it with
Straddling checkerboardThe board alone, keyed by a phrase — VIC's engine room without the schedule or transpositionsThe Straddling Checkerboard page
NihilistThe Russian ancestor: Polybius coordinates added to a running keyThe Nihilist page
ADFGVXThe other great fractionation-plus-transposition system — WWI Germany's, six symbols instead of digitsThe ADFGVX page
One-time padWhat VIC imitates at hand speed: per-message randomness, carried here by the keygroup instead of a pad bookThe One-Time Pad page

VIC and ADFGVX are the two systems history produced when fractionation met transposition under wartime pressure, forty years apart; comparing them is the shortest course in why the second is stronger — digits instead of six symbols, a schedule instead of a single keyword, disruption instead of plain columns, and a key that reseeds itself every message.

Uses & culture

The connoisseur's cipher

VIC's afterlife is outsized for a system one defector explained: it is the set-piece of Kahn's history, the finale of every hand-cipher course, and the benchmark against which "unbreakable by hand" claims are measured. It appears wherever espionage is written about seriously — the hollow nickel is in the FBI's own museum storytelling — and it anchors this site's catalogue the way it anchored its era: nothing done with pencil and paper went further. Working it once, even with a tool doing the arithmetic, teaches what pre-computer cryptography could achieve at its limit — and why the limit was the operator.

Practice

Check the machinery

Practice 1 — verify C by hand

A = 72401, B = 13919. C = ?

Digit by digit, no borrowing: where B's digit exceeds A's, add ten to A's digit for that column only.

Reveal the answer

69592 — 7−1=6, 2−3 wraps to 9, 4−9 wraps to 5, 0−1 wraps to 9, 1−9 wraps to 2. This single line seeds the chain addition that builds F, and through it the whole schedule.

Practice 2 — read the board

On the loaded board, what does 506480 spell?

Single digits first: 5, then 0… but 6 opens a two-digit row. Parse greedily: a 6 or an 8 always starts a pair.

Reveal the answer

ARK/ — parsed greedily: 5 = A, 0 = R, 64 = K, 80 = the board's "/" cell. The string is the first six digits of the schedule's block, not a word — chosen to punish haste. The lesson: on this board, 6 and 8 always open a two-digit code, and every other digit stands alone.

FAQ

Frequently asked questions

Why can't I type a "/" in the message?

Because the slash is structural, not a letter: it is the board's figure-shift symbol (code 80), the marker that brackets every run of digits — each digit doubled between two shifts. The tool inserts those markers itself when you type digits, and refuses a typed "/" by name rather than silently mistreating it. In decodes of period ciphertexts the shift codes are consumed by the digit runs they bracket.

Why does decode ignore the keygroup field?

Because that is the system's design: the keygroup travels inside the message, at the position the date's sixth digit names from the end. The decoder extracts it, rebuilds the schedule from it, and only then can read the rest. An eavesdropper has the keygroup too — VIC's security lives in the phrase, date and personal number that turn it into keys.

What does the date's sixth digit do?

It names the keygroup's hiding place, counted in groups from the end of the transmission: 5 in the loaded example (the date 139195 ends in 5). A sixth digit of 0 names no place, and the tool refuses it by name — as, presumably, did the operators' instructions, since a keygroup that cannot be placed cannot be found by the recipient either.

Is the loaded message the published example's message?

No — the published example's text is a bisected situation report, and this tool does not perform the bisection step (an operator precaution, disclosed in How it works). The loaded message is a fresh text run under the published example's secrets, so that every number in the schedule table is the published one while the tool's own output stays honestly its own — and pinned in the build suite.

Next steps