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

Bifid Cipher - dCode

Tag(s) : Polygrammic Cipher

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

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

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

**Bifid** encryption requires a square grid (or a keyword to generate the grid, generally 5x5 or 6x6) and (optional) a number N which will serve as a period/block length (otherwise take N=1).

__Example:__ Encrypt the plain message DCODE 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 |

Encryption first consists in splitting letters in blocks of size N. This text-splitting is not mandatory, but simplifies encryption/decryption for long texts.

__Example:__ A period of length N=3 for DCODE gives DCO,DE (if the block is incomplete, it does not matter)

For a non split encryption, imagine 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.

__Example:__ 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.

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

Replace the coordinates with the corresponding letters in the grid.

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

These steps are repeated for each block.

__Example:__ The final encrypted message is APIAI

**Bifid** decryption begins identically to encryption.

__Example:__ The message DBAKS has been encrypted with a period N=3 and the grid (generated with the word MESSAGE):

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

1 | M | E | S | A | G |

2 | B | C | D | F | H |

3 | I | K | L | N | O |

4 | P | Q | R | T | U |

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

The message is split into period/block of size N

__Example:__ The message is decomposed in block of 3: DBA,KS

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

__Example:__ The letters of the block D,B,A have the respective coordinates (2,3),(2,1),(1,4).

Write the coordinates on 2 lines (and thus N columns, eventually except the last block)

__Example:__

2 | 3 | 2 |

1 | 1 | 4 |

Then, read vertically by columns

__Example:__ You get 2,1,3,1,2,4 or (2,1),(3,1),(2,4).

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

__Example:__ You find the plain letters (2,1)=B, (3,1)=I and (2,4)=F

These steps are repeated for each block.

__Example:__ The plaintext message is **BIFID**.

The message has a low coincidence index around 0.04 to 0.05.

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.

With a period of 1, the encryption or decryption algorithm has no effect (because the principle of column writing and row reading does not produce a shuffling effect)

Felix-Marie **Delastelle**, civil engineer, described this process in 1902.

dCode retains ownership of the online 'Bifid Cipher' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Bifid Cipher download for offline use on PC, tablet, iPhone or Android !

Please, check our community Discord for help requests!

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

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

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲