Cipher methods Polygraphic
VIC cipher
The VIC cipher is the most sophisticated hand cipher ever deployed for field agents. Designed by KGB cryptographers in the 1950s, it was used by Soviet agents on mission in North America, notably Reino Häyhänen — hence the nickname “VIC cipher”, VIC being the codename assigned to Häyhänen by US intelligence.
The cipher remained unbroken for years despite massive ciphertext interception. It was only broken once Häyhänen defected in 1957 and handed the full system over to the CIA. The cipher is so complex that, without an inside revelation, its purely statistical cryptanalysis would have taken decades more.
How does VIC cipher work?
Three stacked layers
VIC combines three distinct cryptographic operations driven by a reconstructible numeric key:
- Straddling checkerboard — substitutes each letter with 1 or 2 digits.
- First columnar transposition — permutes the digits according to a numeric keyword.
- Second (different) columnar transposition — permutes the digits again with a second keyword.
Step 1 — Straddling checkerboard
A 10×3 (or 10×4) table holding the alphabet:
0 1 2 3 4 5 6 7 8 9
A T O N E S I R
8 B C D F G H J K L M
9 P Q U V W X Y Z . / The 8 most frequent letters (A, T, O, N, E, S, I, R in English) get a single-digit code (0–9 except 8 and 9). The other 18 letters + punctuation get a two-digit code starting with 8 or 9.
Plaintext CIPHE → 81 6 90 85 4 → 816908554 (variable-length code).
Step 2 — First transposition
The result is written into a rectangular grid whose width depends on a numeric key derived from the message date. The columns are permuted according to the key order.
Step 3 — Second transposition
Same again with a different key, derived in a different way, producing fresh scrambling.
The reconstructible key
VIC’s stroke of genius: the key is never transmitted in clear. It is rebuilt from:
- The message date (5 digits)
- An agent identifier (1934 was Häyhänen’s number)
- A novel passage agreed upon ahead of time (title + page number)
- A modular addition transformation combining all of the above
The result: every message has a unique key, which can only be derived by someone holding the internal KGB conventions.
The Häyhänen case (1953–1957)
Reino Häyhänen is a KGB officer of Karelo-Finnish origin, infiltrated into the United States from 1952 under the identity Eugene Maki. His mission: industrial surveillance, contact with other agents, transmission of intelligence via dead drops (microfilms hidden in everyday objects).
The hollow nickel
In 1953, a Brooklyn paperboy accidentally discovers a hollow nickel containing a microfilm. The FBI takes 4 years to realise it’s a VIC message, without ever decrypting it.
The defection (1957)
In 1957, Häyhänen is recalled to Moscow. Panicking (he knows he’ll be liquidated for his operational failures), he defects in Paris and walks into the US embassy.
He hands over:
- The complete VIC manual.
- The key conventions (date, identifier, novel).
- Several still-undecrypted microfilms.
- The identity of Rudolf Abel (alias William Fisher), his handler — who will be arrested a few months later and exchanged in 1962 for Gary Powers (the episode dramatised in the film Bridge of Spies).
Retroactive break
With the manual in hand, the NSA and CIA broke every VIC ciphertext intercepted since 1953 — including the hollow-nickel message, which turned out to be a routine note of no major importance.
What is the real security of VIC cipher?
VIC is, without the manual, one of the strongest hand ciphers ever designed:
- The straddling checkerboard masks letter frequencies.
- Double transposition scrambles all positional structure.
- The reconstructible key makes differential (multi-message) analysis extremely hard.
NSA analysts estimate that without the defection, VIC would probably have resisted 20 to 30 more years — perhaps until the computers of the 1980s.
In CipherChronicle
The workshop ships a two-parameter reduction:
- PIN — 5 digits (the agent’s “personal number”).
- Keyphrase — at least 20 letters; the first 20 drive the keystream.
Internal pipeline (see src/lib/ciphers/vic.ts):
- The keyphrase is cut into two 10-letter halves; each half is assigned an alphabetical ranking spanning 10 digits.
- The PIN (5 digits) is combined mod 10 with the first 5 digits of ranking #1 → a 5-digit seed.
- A chain addition (lagged Fibonacci mod 10) extends the seed to 30 digits.
- Each digit of the stream is added mod 10 to ranking #2 (cyclic) — so the second half of the phrase actually matters to the key.
- The two transposition keys (10 digits each) are slices
0..9and10..19of the enriched stream. - The standard straddling checkerboard (top row
A T O N E S I R) substitutes the cleartext into digits. - Two columnar transposition passes apply the two keys successively.
Decryption rebuilds the same keystream and reverses the three layers in reverse order. Deterministic by construction: identical params produce a stable ciphertext across builds.
Fidelity note — Häyhänen’s historical procedure additionally splices in a 5-digit message indicator chosen per message, a date embedded in the derivation, and a disrupted second transposition (text written into a triangular mask inside the rectangle). Authoritative sources disagree on exact details — the workshop prefers a mechanic that’s comprehensible and reproducible with a two-field UI over a 30-page KGB manual.
Grid
- 1
A digit stream
Twenty digits read as ten pairs (checkerboard then transposition). Distribution remarkably flat.
- 2
Pattern recognition
No clear periodicity. The most common bigrams point to none of the classical ciphers.
- 3
Hypothesis: VIC, straddling checkerboard + double transposition
The numeric key is rebuilt from the message date and an agent identifier.
- 4
Unwind all three layers
Reverse the double transposition (with the numeric key), then read the checkerboard.
- 5
Message revealed
The plaintext emerges — at the cost of long but feasible hand calculations.