Bifid Cipher
Encode and decode using the Bifid cipher. A fractionating cipher that combines Polybius square with transposition.
Used to generate the 5x5 Polybius square
Polybius Square
| 0 | 1 | 2 | 3 | 4 |
|---|
J is treated as I
How Bifid Works
- Convert each letter to row/column coordinates
- Write all rows, then all columns
- Read pairs and convert back to letters
This "fractionates" each letter across two output letters, diffusing the statistics.
What is the Bifid Cipher?
The Bifid cipher is a fractionating cipher that combines the Polybius square with a simple transposition. Invented by Felix Delastelle around 1901, it was considered quite secure for its time because it diffuses the statistical properties of the plaintext.
How It Works
Encryption
- Create a 5×5 Polybius square using the keyword
- For each plaintext letter, find its row and column coordinates
- Write all row numbers in sequence, then all column numbers
- Take pairs of numbers and convert back to letters using the grid
Example
With a standard grid, encrypting "HELLO":
- H = (1,2), E = (0,4), L = (2,1), L = (2,1), O = (2,4)
- Rows: 1, 0, 2, 2, 2
- Cols: 2, 4, 1, 1, 4
- Combined: 1 0 2 2 2 2 4 1 1 4
- Pairs: (1,0) (2,2) (2,2) (4,1) (1,4) → FMMVE
Bifid in Geocaching
The Bifid cipher appears in puzzles because:
- Moderate difficulty: Not too hard, not too easy
- Keyword-based: Finding the keyword is part of the puzzle
- Historical: Interesting cipher history
- Resistance to frequency analysis: Letters are diffused
Breaking the Cipher
Without the keyword:
- Period analysis: Bifid is periodic with period 2
- Known plaintext: Helps determine the grid
- Brute force: Try common keywords
- Hill climbing: Optimize the grid arrangement
Variations
- Periodic Bifid: Use period longer than message
- Trifid: Three-dimensional version (27 letters)
- Four-square: Related digraphic cipher