Skip to main content

Polybius Cipher

Substitution Cipher

A Polybius Square or a Polybius Cipher is a substitution cipher that maps each letter of the alphabet to a pair of coordinates in a grid.

Here is an example of a Polybius Square in a 5x5 grid:

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

In this grid, each letter of the alphabet (excluding "I" or "J") is represented by its corresponding row and column coordinates. For example, the letter "C" corresponds to the coordinates (1, 3), the letter "K" corresponds to the coordinates (2, 5), and so on.

To use the Polybius Square for encryption or decryption, you locate the coordinates of each letter in the grid and encode or decode it accordingly. For example, if you want to encrypt the word "HELLO," you would locate each letter in the grid and replace it with its corresponding coordinates.

Here's an example of encrypting the word "HELLO":

H -> 32
E -> 11
L -> 23
L -> 23
O -> 14

To decrypt the ciphertext, you reverse the process by locating the coordinates in the grid and finding the corresponding letters.

It's worth noting that the Polybius Square can vary slightly depending on the specific implementation or language used. For example, some variations combine the letters "I" and "J" into a single grid cell since they are often treated interchangeably in substitution ciphers.

The Polybius Square is a simple substitution cipher and does not provide robust security against modern cryptographic attacks. It is primarily used for educational purposes, historical reference, or as a basic introduction to encryption techniques.



Polybius (5x5)

  1. A
    AA
  2. B
    AB
  3. C
    AC
  4. D
    AD
  5. E
    AE
  6. F
    BA
  7. G
    BB
  8. H
    BC
  9. I/J
    BD
  10. K
    BE
  11. L
    CA
  12. M
    CB
  13. N
    CC
  14. O
    CD
  15. P
    CE
  16. Q
    DA
  17. R
    DB
  18. S
    DC
  19. T
    DD
  20. U
    DE
  21. V
    EA
  22. W
    EB
  23. X
    EC
  24. Y
    ED
  25. Z
    EE