Monday, October 14, 2013

Code 16 : Bifid Cipher

The Bifid Cipher uses a Polybius Square to encipher a message in a way that makes it fairly difficult to decipher without knowing the secret. This is because each letter in the ciphertext message is dependent upon two letters from the plaintext message. As a result, frequency analysis of letters becomes much more difficult.
The first step is to use the Polybius Square to convert the letters into numbers. We will be writing the numbers vertically below the message.
secret message
411414 3144121
353254 2533125
The numbers are now read off horizontally and grouped into pairs.
41 14 14 31 44 12 13 53 25 42 53 31 25
The Polybius Square is used again to convert the numbers back into letters which gives us our ciphertext.
Since the first letter in the plaintext is encoded into the first and middle letters of the ciphertext, the recipient of the message must have the entire message before they can decode it. This means that if part of the ciphertext is discovered by a third party, it is unlikely that they will be able to crack it.
To decipher a Bifid encrypted message, you first convert each letter into its corresponding number via the Polybius Square. Now, divide the long string of numbers into two equal rows. The digit in the top row and the digit in the bottom row will together reference the decoded letter in the Polybius Square.
The Bifid Cipher can be taken into three dimensions to slightly increase the security of the message. This new cipher is called the Trifid Cipher.


The Bifid cipher was developed in 1901 by the Frenchman Felix Delastelle (*1840; † 1902). He also developed the Four Square cipher.


The cipher is based on the Polybius cipher with an additional change of the position of characters in the text. If the message "GEHEIMNIS" should be encoded for example, the following substitutions result according to the Polybius matrix shown below: G=35, E=13 and so on. The pairs of numbers are written down separated by rows and columns, contrary to the Polybius cipher.
  1 2 3 4 5
1 Q W E R T
2 Z U I/J O P
3 A S D F G
4 H K L Y X
5 C V B N M
The result of the Polybius cipher is: "35 13 41 13 23 55 54 23 32". Separated by row and column, this results in:
Row 3 1 4 1 2 5 5 2 3
Column 5 3 1 3 3 5 4 3 2

These numbers are now read out row by row. First the numbers assigned to the row "314125523" and then the numbers are assigned to the column "531335432". Altogether, this results in: "31 41 25 52 35 31 33 54 32".
This sequence of numbers is now decoded with the Polybius cipher so that the final ciphertext would be: "AHPVGADNS".


The Bifid cipher is more secure than the Polybius cipher. But only as long as it is possible to keep the algorithm a secret because the change in the position of characters happens according to a fixed principle. According to Kerckhoffs’ principle, which states that the security of a cipher should not be dependent on the nondisclosure of the algorithm, the Bifid cipher is not more secure than the Polybius cipher.


The change in the position of characters in the text is called transposition.



Post a Comment

Note: Only a member of this blog may post a comment.