Bifid

History

The Bifid cipher is a fractional substitution cipher which can be considered a combination of substitution and transposition. It was invented by Frenchman Felix Delastelle (1840-1902) and published in his book Traité Élémentaire de Cryptographie (1902).

Description

To encipher text using the Bifid cipher a 5 x 5 square matrix is first created and filled with a keyed alphabet using all the letters of the alphabet, with J being replaced by I. If a 6 x 6 square matrix is selected the 26 letters of the alphabet and numbers 0-9 are used with A followed by 1, B by 2, C by 3 and so on up to J followed by 0. A keyed alphabet is created from a key word, with repeated letters being omitted, followed by the unused letters of the alphabet in alphabetical order.

The keyed alphabet is written into the matrix in a selected route, e.g. horizontal, diagonal or clockwise. For example the key word DELASTELLE is reduced to DELAST when repeated letters are removed. Appending unused alphabet letters produces the keyed alphabet:

DELASTBCFGHIKMNOPQRUVWXYZ

The plaintext is then divided into period length groups and the two coordinates of the position of each letter in the matrix is written below each letter. These digits are then read horizontally in pairs within each group and replaced by the letter in that position in the matrix.

1 2 3 4 5

1 D E L A S

2 T B C F G

3 H I K M N

4 O P Q R U

5 V W X Y Z

Example

Keyword: DELASTELLE

Period: 7

Plaintext: A successful man is one who makes more money than his wife can spend. A successful woman is one who can find such a man. Lana Turner

asucces sfulman isonewh omakesm oremone ythanhi swifeca nspenda success fulwoma nisonew

1142211 1241313 3143153 4313113 4413431 5231333 1532121 3141311 1422111 2415431 3314315

4553325 5453445 2515221 1443254 1424152 4114512 5224244 5522514 5533255 4532144 5251522

DPTAZKG EOHNUMU HQSIVWT QLDHRIY RLQDPOW WHKMDUE SIESBPM HOHSWGA ABDSXIZ FSQAXTR KAHZGSB

hocanfi ndsucha manlana turner

3421323 3114231 3131131 244314

1134542 5155314 4453454 154524

MTIHLUP HACSSXA HHLAUMY FQASUF

Plaintext: asucces sfulman isonewh omakesm oremone ythanhi swifeca nspenda

Ciphertext: DPTAZKG EOHNUMU HQSIVWT QLDHRIY RLQDPOW WHKMDUE SIESBPM HOHSWGA

success fulwoma nisonew hocanfi ndsucha manlana turner

ABDSXIZ FSQAXTR KAHZGSB MTIHLUP HACSSXA HHLAUMY FQASUF

Solving

Solving methods: Hill Climbing and Dictionary keyword search.

After selecting the Bifid cipher, the cipher period must be selected from the Cipher Settings drop down menu. The period range is obtained from the settings in the Options window.

Both 5x5 and 6x6 Bifid solvers have been implemented. If the cipher contains numbers then a 6x6 Bifid is assumed.