How the Bifid cipher works
Bifid starts with a Polybius square: a 5Γ5 grid of letters where each letter has a row number and a column number (I and J share a cell). A keyword scrambles the grid. Then the numbers get mixed.
- Under each letter of the message, write its row number, and under that its column number.
- Split the message into blocks of the chosen period (or keep it as one block).
- For each block, read all the row numbers from left to right, then all the column numbers, as one long line.
- Take that line two digits at a time. Each pair is a row and a column: look it up in the square to get a cipher letter.
To decrypt, write out the coordinates of each cipher letter in order, split the line in half (rows, then columns), and read each plain letter straight down.
Example
With the square BGWKZ QPNDS IOAXE FCLUM THYVR, the message FLEE AT ONCE has rows 4 4 3 3 3 5 3 2 4 3 and columns 1 3 5 5 3 1 2 3 2 5. Reading the rows and then the columns two at a time gives 44 33 35 32 43 13 55 31 23 25, which spells UAEOLWRINS.
How to break it
- Find the period. Within a block, the cipher letters' coordinates come from neighbouring plain letters, so some pairs of cipher letters at a fixed distance repeat more than chance. That distance gives the period away.
- Known plaintext. A guessed word gives equations between coordinates, which place letters in the square.
- Computer search. With the period known, hill climbing over keyed squares breaks a few hundred letters.
History
FΓ©lix Delastelle described Bifid around 1895, and it appears in his 1902 book on cryptography. It was never a standard military cipher, but it is a favourite of the American Cryptogram Association's solvers and of puzzle hunts.
Related tools
- Trifid cipher: the same idea with three coordinates
- Playfair cipher: the same kind of keyed square
- Four-Square cipher: Delastelle's pair cipher