RU EN ES 中文

Polybius Square

The oldest coordinate cipher, turning letters into numbers — still inspiring code designers today

Why do we need this?

Imagine you are Polybius, a Greek historian and strategist. You need to send signals between troops over long distances — using torches or flags. How do you encode every letter of the alphabet with simple, reliable signals?

Polybius came up with a brilliant solution: a square table where every letter gets a pair of numbers — a row number and a column number. Just send two numbers, and the receiver can reconstruct the letter. That is how one of the earliest ciphers in history was born — one still used today for teaching and for fun.

Unlike the Caesar cipher (a simple substitution), the Polybius square turns letters into pairs of numbers. This not only hides the meaning but is also convenient to transmit by any means: smoke, light, sound. And if you shuffle the order of letters in the table, the cipher's strength increases dramatically.

How does it work?

The basis of the cipher is a square table filled with the letters of an alphabet. For Russian, a 6×6 table is typically used (33 letters + Ё); for English, a 5×5 table (letters I and J are merged). Rows and columns are numbered starting from 1.

1

Building the square

The letters of the alphabet are written row by row. For example, the Russian version (6×6):

А(1,1)Б(1,2)В(1,3)Г(1,4)Д(1,5)Е(1,6) Ё(2,1)Ж(2,2)З(2,3)И(2,4)Й(2,5)К(2,6) Л(3,1)М(3,2)Н(3,3)О(3,4)П(3,5)Р(3,6) С(4,1)Т(4,2)У(4,3)Ф(4,4)Х(4,5)Ц(4,6) Ч(5,1)Ш(5,2)Щ(5,3)Ъ(5,4)Ы(5,5)Ь(5,6) Э(6,1)Ю(6,2)Я(6,3)···

The example below uses the Russian alphabet — the game itself also lets you pick an English layout.

2

Encrypting a letter → coordinates

Every letter is replaced with a pair of numbers: a row number and a column number. For example, the letter "С" sits at row 4, column 1 → cipher "41".

ПРИВЕТ → 35 36 24 13 16 42
3

Transmission and decryption

Knowing the same table, the receiver splits the ciphertext into pairs of numbers. For each pair, they find the row and column and read the letter at the intersection. That is how the original message is recovered.

Example: "35" → row 3, column 5 → letter "П".

4

A secret table

The cipher's strength can be increased by shuffling the letters in the table. If an attacker doesn't know the layout, even with the ciphertext in hand they can't recover the message. This gives you an extra key — the order in which the square is filled.

How the Polybius square works
🔐 Encryption (letter → numbers)
Example:
Letter М (Russian alphabet)
Found in the table: row 3, column 2
Cipher: 32
Formula:
C = (row, col), where row, col are the letter's coordinates in the table.
🔓 Decryption (numbers → letter)
Example:
Cipher 54
Found in the table: row 5, column 4
Letter: ъ
Formula:
P = table[row][col], working backwards from coordinates to a letter.
Why is this brilliant?
The Polybius square is history's first coordinate-based encryption system. It lets you transmit any letter through simple signals (two numbers), requires no complex computation, and scales easily. Even today, this principle is used in QR codes and grid coordinates.
Simplicity + reliability = a cryptography classic
* In our game you can watch step by step as each letter turns into coordinates, with the table highlighted in green and blue.
Key takeaway: The Polybius square turns letters into numbers, and numbers back into letters. This opened the way to every later substitution cipher and matrix-based system. It's easy to do by hand, yet it protects against casual reading.

Now for the real magic

What will you actually do in the interactive simulation?

In the game you don't just read about the Polybius square — you live through the whole encryption and decryption process. The table's visual animation will help this ancient but brilliant method stick with you for good.

For the curious

Historical background

The Greek historian Polybius (c. 200–118 BCE) described this method in his work "The Histories." He used the square to send signals with torches: a 5×5 table of the Greek alphabet, where the number of torches indicated row and column. This let you transmit any letter over a distance of several kilometers.

Why is the cipher still relevant?

The Polybius square is the foundation for many more complex ciphers. For example, World War I saw the use of the ADFGVX cipher, based on a 6×6 table with the letters A, D, F, G, V, X. The method is also used in cryptography puzzles, in QR codes (as a way to encode data), and even in teaching children the basics of encryption.

Topics for further study

The ADFGVX cipher

A German WWI field cipher that used the Polybius square followed by a transposition step.

Coordinate encoding

How the coordinate principle shows up in modern digital communication: from GPS to QR codes.

Table modifications

Shuffling letters, using keywords to fill the square — ways to strengthen the cipher.

Cryptanalysis of the Polybius square

How to break the cipher if you know the frequency of coordinate pairs, and how to avoid that.

From Polybius to RSA

The evolution of ciphers: from simple substitution to asymmetric cryptography.

Practical uses today

  • Teaching the basics of cryptography in schools and courses
  • An element of CTF (Capture The Flag) competitions
  • Creating tabletop cryptography quests and puzzles
  • Demonstrating the principle of "encoding information through coordinates"

Now that you understand the principle of coordinate encryption, it's the perfect time to try it for yourself!

In the interactive simulation you can encrypt your own message while watching the table animate in real time.