Skip to content
Cipherloom密码织机

CIPHER/TOOLS/POLYBIUS SQUARE

Polybius Square — Bench tool

Published 20 Sep 2026 ·

Polybius did not invent a cipher. He invented a notation: a way to write any letter as two numbers between one and five. That notation turned out to be the most reused idea in the history of cryptography, and every cipher in this collection that converts letters to digits is standing on it.

Era
Antiquity
Type
Substitution
Key space
25! (any grid arrangement)
Level
Starter

IWhat this tool does

Fill a 5 x 5 grid with the alphabet, merging I and J into one cell because 26 letters do not fit into 25 cells:

12345
1ABCDE
2FGHIK
3LMNOP
4QRSTU
5VWXYZ

Now LOOM becomes 31 34 34 32. A message turned into a string of digits can be sent as torch flashes at night, written on a wall, tapped out, or hidden inside a longer number.

The cost is visible immediately: the output has a very strong signature. Odd digits only, and always pairs. Anyone who sees a long run of digits from 1 to 5 knows exactly what they are looking at.

PlainDigitsNote
L31row 3, column 1
O34row 3, column 4
M32row 3, column 2

Note what the digit form buys you: the size of the symbol set has dropped from 26 to 5. Five distinguishable signals is a much easier engineering problem than twenty-six, and that is the whole reason the notation exists.

IIThe key

If you may arrange the 25 symbols in the grid any way you like, the key space is 25! — the same enormous number that appears for Playfair, with the same caveat: real users pick a keyword to build the grid, which collapses the space to a few thousand arrangements at most.

But the more useful way to think about the Polybius square is that the grid is not the point. The point is the reduction of an alphabet to a small coordinate system, and coordinate systems compose.

Two digits of 5 values = 25 symbols. Three digits = 125. Add a sixth row and you get 36 symbols, which is exactly how ADFGVX later carried the ten digits and the alphabet together in one grid.

IIIWhat it will not protect

Historical ciphers are for study and recreation and are not suitable for protecting real information. The full analysis is in the cipher entry.

Read the full entry, with deciphering steps and weakness analysis →