Free Tool

Bifid Cipher Tool

A Polybius square whose coordinates get shuffled together

Ciphertext

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.

  1. Under each letter of the message, write its row number, and under that its column number.
  2. Split the message into blocks of the chosen period (or keep it as one block).
  3. For each block, read all the row numbers from left to right, then all the column numbers, as one long line.
  4. 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

Questions

What does the period do in the Bifid cipher?

It sets how many letters are mixed together. With period 5, each block of five letters has its coordinates shuffled on its own. Period 0 mixes the whole message as one block. Both sides must use the same period.

Why is Bifid stronger than a Polybius square?

Each cipher letter is made from coordinates of two different plaintext letters, so one plaintext letter affects two cipher letters. That spreads the letter frequencies out, which is what cryptographers call diffusion.

How do I find the period of a Bifid ciphertext?

Try each period and look at the decrypted text. A computer can also test which period makes certain letter pairs repeat at a fixed distance. Puzzle makers usually give it, or use 5.