Tool to crypt/decrypt the bifid cipher. The bifid cipher uses coordinates of letters and mixes them in order to get new coordinates. This tommographic process is described in Cryptography Elementary Treaty by Delastelle.

Bifid Cipher - dCode

Tag(s) : Cryptography

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!

You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? *Contact-me*!

This page is using the new English version of dCode, *please make comments* !

Sponsored ads

Tool to crypt/decrypt the bifid cipher. The bifid cipher uses coordinates of letters and mixes them in order to get new coordinates. This tommographic process is described in Cryptography Elementary Treaty by Delastelle.

Bifid encryption requires a grid (or a keyword to generate the grid) and (optional) a number N which will serve as a period/block length (otherwise consider N=1).

Consider the grid (generated with the word SECRET):

\ | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|

1 | S | E | C | R | T |

2 | A | B | D | F | G |

3 | H | I | K | L | M |

4 | N | O | P | Q | U |

5 | V | W | X | Y | Z |

First, split letters in blocks of size N.

Consider the plain message DCODE and a period of length N=3.

DCODE becomes 'DCO, DEZ' (here Z is a null letter that fill the block but it will be ignored when decoding, here we chose the last letter of the grid).

This text-splitting is not mandatory, but simplifies encryption/decryption for long texts.

If you don't need to split into blocks, just consider a period size of N = 1 (or a period size equal to or greater than the number of letters in the plain message)

For each letter of the block, write the coordinates of the letters (row, column) in a table.

Take the first block DCO. D=(2,3), C=(1,3), O=(4,2) and write it in a table:

D | 2 | 3 |

C | 1 | 3 |

O | 4 | 2 |

To get new coordinates, read the numbers of the table vertically by columns.

The vertical reading gives 2,1,4,3,3,2 or the coordinates (2,1),(4,3),(3,2).

Simply replace the coordinates with the corresponding letters in the grid.

(2,1) for A, (4,3) for P and (3,2) for I.

These steps are repeated for each block.

The final encrypted message is APIAX

Decryption begins identically to encryption.

Consider the message APIAX (period N=3) to be decrypted with the grid (generated with the word SECRET):

\ | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|

1 | S | E | C | R | T |

2 | A | B | D | F | G |

3 | H | I | K | L | M |

4 | N | O | P | Q | U |

5 | V | W | X | Y | Z |

The message is split into period/block of size N (completed with an empty letter if necessary)

The message is decomposed in block of 3: API,AXZ

Each letter is associated with its position in the grid as coordinates (row, column)

The letters of the block A,P,I have the respective coordinates (2,1),(4,3),(3,2).

Write the coordinates on N columns and 2 lines.

2 | 1 | 4 |

3 | 3 | 2 |

Then, read vertically by columns

You get 2,3,1,3,4,2 or (2,3),(1,3),(4,2).

The new coordinates are then associated with the corresponding letters in the grid.

You find the plain letters (2,3)=D, (1,3)=C and (4,2)=O.

These steps are repeated for each block.

The plaintext message is DCODE.

The message has a low coincidence index around 0.4 to 0.5.

If the grid is 5x5 then it can have at most 25 distinct characters.

Bifid means 'that is cut in half lengthwise', which applies to the Delastelle cipher: the coordinates are cut in 2 during the encryption and decryption steps.

Delastelle described this process in 1902.

dCode retains ownership of the source code of the script Bifid Cipher. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the Bifid Cipher script for offline use, for you, your company or association, see you on contact page !

bifid,delastelle,cipher,felix,marie,civil,coordinates,grid

Source : http://www.dcode.fr/bifid-cipher

© 2017 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaches. dCode