Cipher Table

Polybius square

Lay the alphabet out in a five-by-five grid and give each letter its coordinates, row then column. Twenty-five letters become just five symbols.

Key

How the Polybius square works

Write the alphabet into a 5×5 grid, with I and J in one cell, and number the rows and columns 1 to 5:

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

Each letter is replaced by its row number followed by its column number. H sits in row 2, column 3, so it becomes 23. The word HELLO is 23 15 31 31 34.

For a little secrecy, enter a keyword above. The keyword’s letters go into the grid first, followed by the rest of the alphabet, giving a square that an outsider can’t simply look up.

What it was for

Polybius, a Greek historian of the second century BC, described the system in his Histories as a way of signalling, not hiding. Signallers would hold up torches: a number on the left for the row, a number on the right for the column. For the first time, any message at all could be spelled out over a distance, rather than choosing from a few prearranged signals.

That idea, turning letters into a small set of symbols that are easy to transmit, is the important one. It has been rediscovered many times since.

Descendants

  • The tap code, used by prisoners to talk through cell walls, is a Polybius square sent as knocks.
  • The Playfair cipher uses the same keyed 5×5 grid, but enciphers letters in pairs.
  • ADFGVX, a German field cipher of 1918, labelled the rows and columns with the letters A, D, F, G, V and X (chosen because they sound distinct in Morse code) and then scrambled the result with a columnar transposition.
  • The Nihilist cipher, used by Russian revolutionaries in the 1880s, added a keyword to the Polybius numbers.

Questions people ask

How do I decode Polybius square numbers?

Split the numbers into pairs. The first digit of each pair is the row, the second is the column; look up the letter where they meet. For the standard square, 23 15 31 31 34 spells HELLO.

Why do I and J share a square?

Twenty-six letters won't fit in twenty-five cells, so two must share. I and J is the usual choice in English, since J is rare and the meaning stays clear. The tap code merges C and K instead.

Is the Polybius square secure?

With the standard layout, not at all; it is a code that anyone can look up. With a keyword-scrambled square it becomes a simple substitution cipher, which is still easily broken by frequency analysis.