Polybius Square Cipher Tool
Plaintext
Ciphertext
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 |
What is Polybius Square Cipher?
The Polybius Square Cipher is a classic encryption technique, first introduced by the ancient Greek scholar Polybius. Its basic principle involves using a square grid to map letters to numbers (typically two-digit numbers), enabling encryption and decryption. During encryption, each letter of the plaintext is replaced with the corresponding row and column coordinates of the letter in the square. During decryption, the received numerical coordinates are used to look up the corresponding letters in the predefined square.
How Does the Polybius Square Encrypt?
- Determine the Alphabet, Rows, and Columns: Before encryption, you first need to define the alphabet (supporting multiple languages), as well as the number of rows and columns. You can also choose a separator (e.g., commas, spaces, etc.).
- Generate the Square: Based on the chosen alphabet, rows, and columns, the system will automatically generate the corresponding Polybius Square. Each character in the square will be assigned a row and column coordinate.
- Encryption Process: Each letter in the plaintext is replaced with its row and column coordinates from the square. The result is a string of numerical pairs (row-column coordinates) representing the plaintext.
- Output the Ciphertext: The final ciphertext is a string made up of numerical pairs.
Example
For the standard 26 English letters "ABCDEFGHIJKLMNOPQRSTUVWXYZ", a typical 5x5 grid is used.
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 |
Encrypting the plaintext "HELLO":
- H -> (2, 3)
- E -> (1, 5)
- L -> (3, 1)
- L -> (3, 1)
- O -> (3, 4)
So, the encrypted ciphertext for "HELLO" is: 23 15 31 31 34.
How Does the Polybius Square Decrypt?
- Determine the Alphabet, Rows, and Columns: For decryption, you need to know the alphabet, rows, and columns to construct the correct square.
- Parse the Numerical Pairs: The ciphertext consists of numerical pairs (row-column coordinates). Each pair corresponds to a letter. Using the coordinates from the ciphertext, you look up the corresponding letters in the square.
- Output the Plaintext: Combine the letters found from the square to reconstruct the original plaintext.
Example
If the ciphertext "23 15 31 31 34" is received, using the square from above, we look up each coordinate:
- 23 -> H
- 15 -> E
- 31 -> L
- 31 -> L
- 34 -> O
The decrypted plaintext is: HELLO.
How to Use the Polybius Square Cipher Tool?
- Choose Alphabet, Set Rows and Columns: In the tool, you can select the alphabet for encryption (e.g., English, French, German, other language character sets) and set the number of rows and columns (default is 5x5). The tool will automatically generate the square based on the selected alphabet.
- Set Separator: Configure how the encrypted numerical pairs are separated (e.g., by spaces, commas, etc.).
- Set Unrecognized Character Handling: During encryption and decryption, you can choose whether to ignore unrecognized characters (such as spaces or punctuation). If enabled, the system will skip non-alphabet characters, and only letters will be encrypted or decrypted.
- Enter Plaintext or Ciphertext: Input the plaintext or ciphertext in the corresponding text box. The system will automatically generate the ciphertext or plaintext based on the settings.
- Copy or Download the Result: Copy or download the encrypted or decrypted result for further use as needed.