1001Ferramentas
🥁 Security

Tap Code (Prison) Cipher

Convert text to pairs of taps (5×5 prison tap code) and back — visual representation included.

The tap code: the square turned into sound

The tap code is the Polybius square transmitted by sound. Each letter is a row and a column of the five-by-five grid, and each number becomes that many knocks with a pause in between. The letter C, first row and third column, is one knock, pause, three knocks. It became known through use among prisoners of war in Vietnam, who passed it along through cell walls.

The page converts both ways: text into taps, represented as dots, and taps back into text. The grid drops K, written as C — the same solution the Polybius square uses to fit 26 letters into 25 cells, only choosing a different pair. A word break appears as a longer pause.

The ingenuity of the system lies in what it requires: nothing. No paper, no light, no elaborate agreed code — just the memorised grid, which fits into a minute of explanation. That is what let it spread among prisoners who had never met, taught knock by knock by those who already knew. It is a rare case of a cipher whose main quality is how easily it travels.

Frequently asked questions

Why does K become C?
Because the grid has 25 cells for 26 letters and one has to go. K is the usual choice here for being infrequent and sounding close to a hard C, which makes reading natural. The Polybius square tends to merge I and J; the logic is the same.
Is it a secure cipher?
No, and it never aimed to be: anyone who knows the grid deciphers instantly. The protection it offered was different — communicating without speaking, in an environment where speaking was forbidden and watched. Against anyone who knew the system, there was no secret.
How is the end of a word marked?
By a longer pause, which the page represents with wider spacing. In actual practice among prisoners, the convention varied and included agreed signals for requesting a repeat, acknowledging receipt and ending the transmission.

Related Tools