Crypto Wiki
No Title

No Title

No information

The tap code is a way to encode messages, letter by letter, in a very simple way and transmit it using a series of tap sounds, hence its name[1]. It has been commonly used by prisoners to communicate with each other. The method of communicating is usually by "tapping" either the metal bars, pipes or the walls inside the cell.


The tap code is based on a 5×5 grid of letters, representing all the letters of the Latin alphabet except K (C is used to represent K). Each letter was communicated by tapping two numbers: the first designated the row (horizontal) and the second designated the column (vertical). The letter "X" was used to break up sentences. The tap code requires the listener to only discriminate the timing of the taps to isolate letters. For example, to specify the letter "A", one would tap once, pause, and then tap once again.

Or to communicate the word "WATER" the cipher would be the following (the time between each pair of numbers is smaller than the one between two different letters):

(5,2) (1,1) (4,4) (1,5) (4,2)
..... .. . . .... .... . ..... .... ..

Because of the difficulty and length of time required for specifying a single letter, prisoners often devise abbreviations and acronyms for common items or phrases, such as "GN" for Good Night, or "GBU" for God Bless You.[2]

By comparison, Morse code is harder to send by tapping or banging because Morse requires the ability to create two different sounding taps. A Morse novice would also need to keep a cheat sheet until he remembers every letter's code, which his captors would likely confiscate. Tap code can be easily decoded in one's head by mentally using the table.


The origins of this encoding go back to the Polybius square of Ancient Greece. As the "knock code", a Cyrillic alphabet version is said to have been used by nihilist prisoners of the Russian Czars.[3] The knock code is featured in Arthur Koestler's classic 1941 work Darkness at Noon.[4]

United States prisoners of war during the Vietnam War are most known for having used the Tap Code. It was introduced in June 1965 by four POWs held in the Hoa Lo "Hanoi Hilton" prison: Captain Carlyle "Smitty" Harris, Lieutenant Phillip Butler, Lieutenant Robert Peel, and Lieutenant Commander Robert Shumaker.[2] Smitty Harris had heard of the tap code being used by prisoners in World War II[5] and remembered a United States Air Force instructor who had discussed it as well.[2]

In Vietnam, the tap code became a very successful way for otherwise isolated prisoners to communicate.[5] POWs would use the tap code in order to communicate to each other between cells in a way which the guards would be unable to pick up on. They used it to communicate everything from what questions interrogators were asking (in order for everyone to stay consistent with a deceptive or bogus story), to who was hurt and needed others to donate meager food rations. It was easy to teach and newly arrived prisoners became fluent in it within a few days.[6][7] It was even used when prisoners were sitting next to each other but not allowed to talk, by tapping on anothers' thigh.[7] By overcoming isolation with the tap code, prisoners were able to maintain a chain of command and keep up morale.[5]


  2. 2.0 2.1 2.2 Template:Cite web
  3. David Kahn, The Codebreakers - The Story of Secret Writing. 1967. ISBN 978-0-684-83130-5.
  4. Koestler, Arthur, Darkness at Noon (1941). Translated by Daphne Hardy. See page 19 of the Bantam Publishing paperback, 1981 printing for more info.
  5. 5.0 5.1 5.2 Template:Cite news
  6. Template:Cite book pp. 211–212.
  7. 7.0 7.1 Template:Cite book pp. 171–172, 187–188.

External links[]