Bifid Cipher Encrypt & Decrypt

Combines a Polybius square with fractionation for diffusion.

Ad placeholder (leaderboard)

The Bifid cipher, invented by Félix Delastelle around 1901, strengthens the Polybius square by adding fractionation. Instead of substituting letters directly, it splits each letter into its row and column coordinates, mixes those coordinates across the whole message, and then recombines them into new letters. This diffusion is what makes Bifid harder to break than the squares it is built from. This tool runs the full algorithm in your browser.

How it works

Build a keyed 5×5 square from a keyword followed by the rest of the alphabet, with I and J sharing a cell. Convert each plaintext letter to its row and column number on that square.

Now fractionate: write all the row numbers in order, then append all the column numbers. Read this combined number stream in pairs, treating each pair as a (row, column) coordinate, and look up the letter at that cell. The result is the ciphertext.

Decryption reverses the steps: turn each ciphertext letter back into a pair of numbers, lay the full stream out as a single sequence, split it into a first half (the rows) and a second half (the columns), and pair the two halves position by position to recover each plaintext letter.

Example

Using a keyword such as KEYWORD, the word GERATOOLS is first converted to coordinates, the rows and columns are concatenated, and the stream is re-read in pairs to produce a scrambled ciphertext. Decrypting with the same keyword restores GERATOOLS exactly.

Notes

This implementation fractionates over the entire message (no fixed period), which is the simplest classic form. A periodic variant breaks the text into blocks of a set length and fractionates each block separately, trading some diffusion for easier hand operation.

Ad placeholder (rectangle)