What is the Bifid Cipher?

Invented around 1901 by Felix Delastelle, the bifid cipher is a cipher based on a mixed-alphabet Polybius square, which looks like the following:

  | 1 2 3 4 5 6
----------------
1 | B G W K Z 0
2 | Q P N D S _
3 | I O A X E 1
4 | F C L U M 3
5 | T H Y V R 2
6 | 4 5 6 7 8 9

(The underscore represents a space for reading ease.)

To encrypt some plaintext, each character is converted to its numerical coordinates along the vertical and horizontal direction (in this order). The coordinates of each character are written vertically beneath the character. For example, to encrypt the message FLEE AT ONCE, we would write out:

F L E E _ A T _ O N C E
4 4 3 3 2 3 5 2 3 2 4 3
1 3 5 5 6 3 1 6 2 3 2 5

We then flatten the numbers into one row like this.

4 4 3 3 2 3 5 2 3 2 4 3 1 3 5 5 6 3 1 6 2 3 2 5

Then we turn them back into pairs like

44 33 23 52 32 43 13 55 63 16 23 25

Finally, we use the Polybius square to convert these numbers back into characters using the square from before. 44 becomes U, 33 becomes A, etc. Remember that the first number is the row and the second number is the column.

  | 1 2 3 4 5 6
----------------
1 | B G W K Z 0
2 | Q P N D S _
3 | I O A X E 1
4 | F C L U M 3
5 | T H Y V R 2
6 | 4 5 6 7 8 9

This gives us the ciphertext:

U A N H O L W R 6 0 N S

Thus, the plaintext FLEE AT ONCE encrypts to UANHOLWR60NS

FLEE AT ONCE
------------
UANHOLWR60NS

Breaking the Bifid Cipher

Using the Bifid Cipher

  • Encrypt text with Bifid cipher using this CyberChef recipe
  • Encrypt text using Bifid cipher using cryptii.com
  • Decrypt text encrypted with Bifid cipher with the key using this CyberChef recipe
  • Decrypt text encrypted with Bifid cipher with the key using cryptii.com