Hawkynt

Polybius Square

Ancient coordinate-based cipher system that converts letters to coordinate pairs using a 5×5 grid. Invented by Greek historian Polybius around 150 BCE for long-distance communication via torch signals. Forms foundation for many advanced classical ciphers.

Properties

Property Value
Category Classical Ciphers
Sub-category Classical Cipher
Security status 🎓 Educational Only
Complexity Beginner
Inventor Polybius
Year -150
Origin Not specified
Source algorithms/classical/polybius.js

Security

Status: 🎓 Educational Only

Known vulnerabilities

Issue Description Mitigation
Each letter always maps to same coordinate pair, preserving frequency patterns — Educational use only - provides no security by modern standards
Identical plaintext produces identical coordinate patterns making analysis easy — Historical demonstration cipher only

Documentation

References

Test vectors

3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 — Plain A-Z square, row then column, both 1-indexed. The Wikipedia article works a different message, so it carries no value for this input

Field Value
key (empty)
input 48454c4c4f
expected 3233203135203331203331203334

Vector 2 — Ancient Greek example

Field Value
key (empty)
input 504f4c5942495553
expected 3335203334203331203534203132203234203435203433

Vector 3 — I/J equivalence test (J->I conversion)

Field Value
key (empty)
input 49555354494345
expected 3234203435203433203434203234203133203135

← All algorithms