Skip to main content
CipherChronicle

Cipher methods Grid

Tap code

A « tapped » variant of Polybius: each letter is transmitted by the number of knocks matching its coordinates in a 5×5 grid.

Family :
Grid
Difficulty :
Beginner
Era :
Antiquity (Polybius), revived by Vietnam POWs (1960s)

Also known as : knock code · POW tap code

The tap code is a historical derivative of the Polybius square, designed to be transmitted by tapping on a wall. It’s famous for its use among American prisoners of war in Vietnam during the 1960s-70s: to communicate cell-to-cell through the walls of the Hanoi prison.

Principle

The grid

Like Polybius, a 5×5 grid holds the alphabet. The classic tap code merges K with C (rather than I/J as in Polybius):

     1  2  3  4  5
  1  A  B  C/K D  E
  2  F  G  H  I  J
  3  L  M  N  O  P
  4  Q  R  S  T  U
  5  V  W  X  Y  Z

Transmission

Each letter is coded by its (row, column) pair. The sender taps:

  1. First the row (1 to 5 knocks).
  2. A short pause.
  3. Then the column (1 to 5 knocks).
  4. A long pause before the next letter.

Example: H (row 2, column 3) transmits as ·· ··· (2 taps, pause, 3 taps).

Example

HELLO transmits as:

H = 2,3 → ·· ···
E = 1,5 → · ·····
L = 3,1 → ··· ·
L = 3,1 → ··· ·
O = 3,4 → ··· ····

A short 5-letter message totals about 30 to 50 taps. POWs could convey a sentence in a few minutes with a little practice.

History

  • Ancient Greece — Polybius describes the method with torches (one for the row, one for the column).
  • Russian nihilists use knocking in prison in the 19th century.
  • Vietnam, 1965 — Captain Carlyle Harris teaches the tap code to American Hanoi POWs. Allowed rebuilding the chain of command, sharing names and testimony, and preserving morale. A central narrative in many POW memoirs.

Variants

  • Polybius — written version, 5×5 grid but I/J merged.
  • Nihilist — Polybius + additive key.
  • 6×6 cipher — enlarged version including digits 0-9.

Weaknesses

Tap code is a code, not a cipher: no key, the table is public. Its security rests entirely on the adversary’s ignorance of the method — which wasn’t the case in Vietnam, but the value of inter-prisoner communication outweighed the risk of interception.

Against an informed attacker:

  • Instant frequency analysis (it’s keyless Polybius).
  • No resistance whatsoever against automated tools.

Its value is practical and symbolic, not cryptographic.

In CipherChronicle

Tap code offers a sonic mode: puzzles can be played by ear, each letter represented by taps. It’s also a bridge to the history of operational cryptography — an extremely simple code that saved lives.

Grid

2
3
1
5
3
1
3
1
3
4
Q
R
S
T
U
V
W
X
Y
Z
A
B
C
D
E
  1. 1

    Stream of tapped numbers

    Number pairs — first = row, second = column. Polybius signature.

  2. 2

    Tap-code grid (K omitted)

    The 5×5 grid holds the alphabet (K merged with C) — tap codes resolve in it.

  3. 3

    Reading: 23 = H (row 2 col 3), 15 = E, 31 = L, 34 = O

    Each pair directly names a grid cell.

  4. 4

    Pair-by-pair substitution

    Replace each pair by the letter in its cell.

  5. 5

    Message revealed

    The word surfaces once all pairs are decoded — here HELLO.