Fact-checked by Grok 2 weeks ago

Bifid cipher

The Bifid cipher is a fractionating invented by the French cryptographer Félix Delastelle in 1895, which combines elements of and to enhance security beyond simple monoalphabetic ciphers. It operates using a 5×5 that maps the 25 letters of the (typically omitting 'J' or merging it with 'I') to row and column coordinates from 1 to 5; each letter is converted to its pair of coordinates, which are written out in a sequence, transposed by reading them in a different order (often by grouping into a grid and reading column by column), and then recombined back into letters via the same square to produce the . This fractionation process breaks letters into components, diffusing them across multiple positions for greater resistance to . Delastelle first described the cipher in the French journal Revue du Génie civil under the title "cryptographie nouvelle," and it was later detailed in his 1902 Traité élémentaire de cryptographie. As one of several manual ciphers developed by Delastelle—including the related Trifid and Four-square variants—the Bifid cipher gained popularity among amateur cryptographers in the early but was never adopted for official military or governmental use due to its vulnerability to systematic . Its strength lies in the period length (typically 5 or 10) that determines grouping, allowing for variable complexity, though modern computational methods like can break it efficiently. The cipher's design exemplifies early polygraphic techniques, where multiple letters influence each ciphertext symbol, making it a notable precursor to more advanced systems like the used in . Despite its historical limitations, the Bifid remains a pedagogical tool for understanding and principles in education.

History

Invention and Inventor

The Bifid cipher was invented by Félix Delastelle, a cryptographer active in the late 19th and early 20th centuries. Delastelle first described the cipher in 1895 under the title "Cryptographie nouvelle" in the journal Revue du Génie civil, where he introduced it as a method combining substitution and techniques based on the classical . This innovation marked an early application of in , splitting letters into components to obscure their individual identities. Born on January 2, 1840, in , , and passing away on April 2, 1902, Delastelle pursued as an intellectual pursuit alongside his professional career in , including roles in the French tobacco monopoly. As an amateur in the field during an era dominated by military and diplomatic experts, he contributed significantly through self-study and experimentation, publishing his ideas in periodicals and later compiling them in works such as Traité élémentaire de cryptographie (1902). Delastelle's primary motivation for developing the Bifid cipher was to create a system resistant to simple , a common cryptanalytic technique of the time that exploited letter occurrence patterns in monoalphabetic ciphers. By the into rows and columns via the and then rearranging them through , the cipher diffused letter statistics across multiple positions, making it more secure for manual . This approach reflected his broader interest in polygraphic ciphers; he also invented the related Trifid and Four-square ciphers, which similarly employed multiple substitution tables and for enhanced .

Historical Context and Usage

The Bifid cipher emerged in the late 19th and early 20th centuries, during the final era of manual cryptographic systems that relied on pen-and-paper methods, preceding the advent of mechanical encryption devices such as the patented in 1918. Invented by French cryptographer Félix Delastelle and detailed in his 1902 book Traité Élémentaire de Cryptographie, it represented an advancement in polygraphic ciphers through its use of to achieve greater of letters compared to simpler digraphic substitutions like the , which was employed by British forces during . While primarily adopted by amateur cryptographers for recreational and educational purposes, the Bifid cipher saw limited practical application in military and espionage contexts. During , it was used in the Dutch resistance's Operation alongside ciphers such as double transposition and Playfair for secure tactical communications. The cipher's popularity waned in the with the proliferation of rotor-based machines, which offered higher security and efficiency for large-scale communications, rendering manual polygraphics like the Bifid obsolete for professional use but retaining niche appeal among enthusiasts.

Description

Polybius Square Setup

The Bifid cipher relies on a , a 5×5 that accommodates the 25 letters of the by omitting the letter J or combining it with I. This structure, numbering rows and columns from 1 to 5, serves as the foundational mapping mechanism for converting letters into numerical coordinates during . Letters are placed in the in row-major order, starting from the top-left cell and proceeding left to right, top to bottom. To enhance security, a keyword is often used to rearrange the : duplicates are removed from the keyword, and the remaining letters of the (excluding J) are appended in standard order. For example, with the keyword "KEYWORD", the unique letters K, E, Y, W, O, R, D are placed first, followed by A, B, C, F, G, H, I, L, M, N, P, Q, S, T, U, V, X, Z. This results in the following :
12345
1KEYWO
2RDABC
3FGHIL
4MNPQS
5TUVXZ
Each letter in the grid is assigned coordinates consisting of its row number followed by its column number (both ranging from 1 to 5). For instance, the letter "A" is at position (2,3), denoted as 23, while "Z" is at (5,5), or 55. These coordinates form the basis for the cipher's step, where letters are broken into pairs of numbers for subsequent processing.

Message Fractionation

In the Bifid cipher, the message fractionation step begins with preparing the by removing all spaces, , and converting it to uppercase letters, while typically combining I and J into a single position in the 5x5 grid to accommodate the 25-letter alphabet. This preparation ensures a clean sequence of letters for processing. Each letter in the prepared is then converted to a pair of numerical coordinates—row and column numbers—based on its position in the , a 5x5 grid filled with letters in a keyed order. The row numbers for all letters form a single horizontal layer (sequence), and the column numbers form a parallel layer directly alongside it, creating two numerical strings of equal length to the . This digraphic splits the identity of each letter across the layers, enhancing diffusion before further processing. The message is often processed according to a period length (commonly 5) in the subsequent step. To illustrate, consider the short plaintext "DEFEND" using the keyed Polybius square from the previous subsection:
  • Prepared message: DEFEND
  • Coordinates: D(2,2), E(1,2), F(3,1), E(1,2), N(4,2), D(2,2)
  • Row layer: 2 1 3 1 4 2
  • Column layer: 2 2 1 2 2 2
These layers represent the fractionated form, where the original letters are obscured by their separated components.

Encryption Process

Coordinate Extraction and Layering

In the encryption process of the Bifid cipher, the first phase following message fractionation involves extracting the numerical coordinates from the and organizing them into two distinct layers. Each letter, after being mapped to its row and column position in the 5x5 (where I and J are typically merged), yields a pair of digits representing the row and column indices (numbered 1 through 5). These coordinates are then separated: all row numbers form the first (upper) layer as a sequence, and all column numbers form the second (lower) layer as a parallel sequence, each of equal length to the original message length n. This layering preserves the total count of digits (2n) while preparing them for subsequent without altering their individual values. The used is a key-dependent 5x5 grid filled with a mixed derived from a keyword followed by the remaining letters (e.g., a standard square without keyword places A at row 1 column 1, B at 1-2, up to Z at 5-5). For , the is converted letter-by-letter into these coordinates; for instance, in a standard square, H corresponds to row 2 column 3, E to 1-5, L to 3-1, and so on. The row layer is written sequentially above the column layer, creating a two-row block of digits where the position aligns with the original message order. This structure facilitates the cipher's by treating each letter as two independent components, enhancing before recombination. To illustrate, consider the "HELLO" using the standard : \begin{array}{c|ccccc} & 1 & 2 & 3 & 4 & 5 \\ \hline 1 & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} \\ 2 & \text{F} & \text{G} & \text{H} & \text{I/J} & \text{K} \\ 3 & \text{L} & \text{M} & \text{N} & \text{O} & \text{P} \\ 4 & \text{Q} & \text{R} & \text{S} & \text{T} & \text{U} \\ 5 & \text{V} & \text{W} & \text{X} & \text{Y} & \text{Z} \\ \end{array} The coordinates are: H (2,3), E (1,5), L (3,1), L (3,1), O (3,4). The row layer is thus 2 1 3 3 3, and the column layer is 3 5 1 1 4, both sequences of length 5 matching the message. No padding is added for this step, as the layers directly reflect the message length, ensuring balanced in the next phase. This example demonstrates how the layering isolates positional data for mixing while maintaining traceability to the original .

Rearrangement and Recombination

After the coordinates have been extracted from the Polybius square and separated into distinct row and column layers, the encryption process advances to the rearrangement phase, where these layers are transposed to diffuse the information. The transposition involves concatenating the sequence of row numbers followed by the sequence of column numbers, forming a single mixed string of digits for the block (determined by the period length, often equal to the message length for short examples). This step disrupts the original pairing by blending digits from multiple letters, achieving the cipher's fractionation effect. To recombine, the mixed digit string is divided into consecutive pairs, where the first digit of each pair represents the row and the second the column in the . Each pair is then mapped back to the corresponding letter, producing the block. This pairing ensures that the row coordinate for a letter may come from one letter, while its column coordinate derives from another, further obscuring the original message. The process is typically applied block by block if a period is specified, with blocks concatenated to form the final . Consider a simple example using the standard 5x5 (I/J combined) with no keyword, and "HELLO" (period 5):
Row/Col12345
1ABCDE
2FGHIK
3LMNOP
4QRSTU
5VWXYZ
The coordinates are H=(2,3), E=(1,5), L=(3,1), L=(3,1), O=(3,4). The row layer is 21333, and the column layer is 35114. Concatenating yields the mixed sequence 2133335114. Pairing gives 21, 33, 33, 51, 14, which convert to F, N, N, V, D, producing "FNNVD". This method, invented by Félix Delastelle in 1895, relies on the period to control diffusion; shorter periods increase security by enhancing mixing within blocks but may complicate implementation for long messages.

Decryption Process

Layer Separation and Coordinate Recovery

To decrypt, first convert each letter to its row and column coordinates using the , then concatenate these coordinates in order: for each ciphertext letter, append its row number followed by its column number. This produces a sequence of 2m digits, where m is the message length (or block length if using a period). The first m digits of this sequence are the original row coordinates, and the last m digits are the original column coordinates. Equivalently, this can be visualized by writing the 2m-digit sequence into a 2×m grid filled row by row—the top row will contain the original row coordinates, and the bottom row the original column coordinates—effectively isolating the fractionated components. This step reverses the from the process. For messages longer than the length (typically 5 or 10), apply this process separately to each block of the corresponding to the . Proper execution requires knowing the and the used in . For example, consider the corresponding to the "HELLO" (detailed in the next subsection), which yields the coordinate sequences 2,1,3,3,3 for rows and 3,5,1,1,4 for columns after separation. These recovered coordinate sequences are then paired position by position and mapped back using the to reconstruct the .

Message Reconstruction

After recovering the separated row and column coordinate sequences through the layer separation process, message reconstruction in the Bifid cipher involves pairing these sequences positionally to restore the original digrams and mapping them back to plaintext letters using the Polybius square. The row sequence, consisting of the row indices (typically numbered 1 to 5) for each original plaintext letter, is aligned directly with the corresponding column sequence of column indices. For a message of length m, this produces m pairs (r_i, c_i), where r_i is the i-th element of the row sequence and c_i is the i-th element of the column sequence. Each pair (r_i, c_i) is then located in the Polybius square to identify the corresponding letter, effectively reversing the initial fractionation step. The is a 5×5 grid (25 positions for the 26-letter , excluding one letter or combining two), ensuring a unique mapping from each pair to a single letter. For instance, in a standard square without a keyword: \begin{array}{c|ccccc} & 1 & 2 & 3 & 4 & 5 \\ \hline 1 & \text{A} & \text{B} & \text{C} & \text{D} & \text{E} \\ 2 & \text{F} & \text{G} & \text{H} & \text{I/J} & \text{K} \\ 3 & \text{L} & \text{M} & \text{N} & \text{O} & \text{P} \\ 4 & \text{Q} & \text{R} & \text{S} & \text{T} & \text{U} \\ 5 & \text{V} & \text{W} & \text{X} & \text{Y} & \text{Z} \\ \end{array} I and J ambiguities are handled by merging them into a single position (typically row 2, column 4), with the encryption convention dictating the output: both input I and J map to this position, and during reconstruction, the position is conventionally rendered as I unless context requires J. To verify, consider reconstructing "HELLO" from its separated coordinates using the above square (row sequence 2,1,3,3,3 and column sequence 3,5,1,1,4). Pairing positionally gives: (2,3) → H, (1,5) → E, (3,1) → L, (3,1) → L, (3,4) → O, yielding the original "HELLO". This process ensures the message is fully restored without loss, provided the square and period match those used in . For the full example, the for "HELLO" using this square and period 5 is "FNNVD"; applying the separation recovers the coordinates as shown.

Examples

Simple Encryption Example

To illustrate the encryption process of the Bifid cipher, consider the plaintext message "BIFID" using the standard 5×5 , where the letters I and J share the same position (row 2, column 4), and the alphabet is arranged sequentially without a keyword. This example uses a period of 5 (equal to message length) for simplicity. The is set up as follows:
12345
1ABCDE
2FGHI/JK
3LMNOP
4QRSTU
5VWXYZ
First, fractionate the message by converting each letter to its row and column coordinates:
  • B: row 1, column 2
  • I: row 2, column 4
  • F: row 2, column 1
  • I: row 2, column 4
  • D: row 1, column 4
This yields the row sequence: 1 2 2 2 1
and the column sequence: 2 4 1 4 4
Next, layer the sequences by concatenating the row numbers followed by the column numbers to form a single string of digits: 1222124144 Then, rearrange by dividing this string into consecutive pairs, treating the first digit of each pair as the new row and the second as the new column: 12, 22, 12, 41, 44 Finally, recombine by converting each pair back to a letter using the :
  • 12: row 1, column 2 = B
  • 22: row 2, column 2 = G
  • 12: row 1, column 2 = B
  • 41: row 4, column 1 = Q
  • 44: row 4, column 4 = T
The resulting is "BGBQT".

Decryption Verification

To verify the decryption process and confirm its bidirectionality with the steps, consider the "BGBQT" generated in the simple encryption example using the standard . The decryption reverses the process: first convert each ciphertext letter to its row and column coordinates, yielding the layered sequence 1222124144 (rows of ciphertext letters: 1 2 1 4 4; columns: 2 2 2 1 4; concatenated). For this 5-letter ciphertext, this yields 10 numbers. The inverse operation separates the first 5 numbers as the original row coordinates (1 2 2 2 1) and the last 5 as the original column coordinates (2 4 1 4 4), reversing the layering applied during . Pairing them positionally—(1,2), (2,4), (2,1), (2,4), (1,4)—and mapping each pair back to the corresponding letters in the yields the original plaintext "BIFID."
PositionRow CoordinateColumn CoordinateMapped Letter
112B
224I
321F
424I
514D
This recovery demonstrates no ambiguities in the mapping, as each unique row-column pair corresponds to exactly one letter in the square, provided the same square is used by both parties. The equal length of and also facilitates error-checking, confirming complete reconstruction without loss or extraneous data.

Cryptanalysis

Frequency Analysis Techniques

The Bifid cipher's fractionation process mixes letters into coordinates via a , yet it retains underlying digram frequencies in the , permitting analysis to detect patterns. This retention occurs because the transposition of row and column indices preserves statistical correlations from the , such as the relative frequencies of adjacent letters, albeit diffused across the output. The maps each letter to a row-column pair, which briefly references the essential for this mapping. Cryptanalysts exploit this by counting the occurrences of common digrams in the ciphertext, such as "TH" or "HE" in English plaintext, which appear with frequencies around 3.9% and 3.1%, respectively, and matching these to probable Polybius coordinates that align with high-probability plaintext pairs. To determine the period length \ell, frequencies of identical letters separated by distance d are computed, revealing a sinusoidal pattern where peaks indicate the period; for instance, the probability P_d of repeated letters incorporates block-position frequencies B_\alpha, C_\alpha, and A_\alpha via formulas like P_d = \sum_\alpha B_\alpha^2 \cdot P(HH)_d + \sum_\alpha C_\alpha^2 \cdot P(MM)_d. Once the period is identified through bigram variance spikes—for example, a clear peak at step 6 for \ell=12—trial alignments with English quadgram statistics help reconstruct the square. Short keys in the construction, derived from keywords, limit randomization, causing letters to cluster in rows or columns and exposing predictable digram patterns that deviate from . This vulnerability is amplified in messages under 400 characters, where statistical obscures less but still allows detection of non-random bigram distributions if the keyword fails to disperse common letters effectively.

Known Weaknesses and Attacks

The Bifid cipher is particularly vulnerable to known-plaintext attacks, where an attacker possesses a portion of the corresponding (a "crib") and . By aligning the crib with the , the attacker can deduce the period length through in the fractionation grid and reconstruct the by mapping the known coordinates to positions, effectively revealing the substitution and transposition components. For short messages, the cipher fails to provide robust , as the fractionation process relies on a of sufficient height (determined by the ) to mix coordinates effectively; a single letter or very brief maps directly to its row and column indices without , reducing the cipher to a simple monoalphabetic unless padded with nulls or fillers, which, if predictable, further exposes structural patterns. The key space of the Bifid cipher, while theoretically large at approximately 25! (∼1.55 × 10²⁵) permutations for the 5×5 combined with a small set of possible period lengths (typically 1–20), is practically constrained and amenable to modern computational attacks. Brute-force enumeration remains infeasible, but heuristic methods such as or hill-climbing algorithms can efficiently search the space by optimizing against n-gram log-likelihood scores derived from the , often recovering the in seconds to minutes with as little as 200 characters of . Automated tools for ciphertext-only further exploit these limitations, employing statistical techniques to estimate the period via variance analysis and generate candidate squares based on row/column probability distributions, achieving high success rates (over 90% for sufficiently long texts) on standard hardware without requiring .

References

  1. [1]
    Bifid Cipher - Practical Cryptography
    It was invented by Felix Delastelle. Delastelle was a Frenchman who invented several ciphers including the bifid, trifid, and four-square ciphers.Missing: inventor | Show results with:inventor
  2. [2]
    security of Felix cipher - Cryptography Stack Exchange
    Dec 15, 2012 · The Felix cipher is an expanded form of the Bifid cipher originally devised in 1901 by Felix Marie Delastelle. The author of this work ...
  3. [3]
    Le chiffre de Delastelle - Bibmath.net
    Il est dû à Félix-Marie Delastelle, qui le propose en 1895 dans le journal Revue du génie civil sous le nom de "cryptographie nouvelle". Le chiffrement d'un ...
  4. [4]
    None
    Below is a comprehensive merged response summarizing all mentions and relevant information related to "Bifid Cipher," "Delastelle," and "Fractionating Transposition" from the provided excerpts of *The Codebreakers* by David Kahn, based on the summaries provided. Given the volume of information and the need for a dense representation, I will use tables in CSV format where appropriate to organize details efficiently, followed by a narrative summary for context and additional notes. The response retains all information mentioned across the summaries, addressing search results, historical context, invention, usage, page references, direct quotes, and useful URLs.
  5. [5]
    [PDF] Automated Ciphertext-Only Cryptanalysis of the Bifid Cipher
    The Bifid cipher [Ame05, Kah67] was invented by Félix-Marie Delastelle (1840-1902) and although was never used in any “serious” application, it became one of ...Missing: history | Show results with:history
  6. [6]
    lanaki17.txt - Department of Mathematics and Statistics
    The Bifid and Trifid ciphers represent a new and tougher breed of classical cipher - Fractionated Ciphers. The process of fractionation, whereby the substitute ...Missing: "cryptography | Show results with:"cryptography<|control11|><|separator|>
  7. [7]
    [PDF] LN2 copy - Mark Zhandry
    Bifid Cipher. Polybius square + Transposition + Inverse Polybius. Invented in 1901 by Felix Delastelle. Each ctxt character depends on two ptxt characters.
  8. [8]
    [PDF] 004 A Book on Classical Cryptography - National Cipher Challenge
    ... English text. One way to measure the fitness of the text is to define ... Félix-Marie Delastelle, Traité Élémentaire de Cryptographie. Paris: Gauthier ...
  9. [9]
    The Bifid and Trifid Cipher Explained - www.kopaldev.de
    Dec 20, 2022 · The trifid cipher was invented by Félix Marie Delastelle as an extension of the above shown bifid cipher. The decryption is the reverse process ...Missing: inventor | Show results with:inventor
  10. [10]
  11. [11]
    Bifid Cipher - Delastelle - Online Decoder, Encoder, Solver - dCode
    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 ...Bifid Encoder · How to encrypt using Bifid... · How to decrypt a Bifid cipher?
  12. [12]
    [PDF] Cryptography Name________
    The Bifid Cipher is a type of matrix, or columnar transposition, cipher. Start by creating a 5 by 5 matrix of letters, with the rows and columns labeled 1 to 5.
  13. [13]
    Elementary Cryptanalysis | Project Gutenberg
    Below is a merged response that consolidates all the information from the provided summaries into a single, comprehensive overview of the Bifid cipher and related content. To maximize detail and clarity, I will use a table in CSV format to organize key aspects (e.g., definition, mechanism, cryptanalysis, historical use) across the different sources and summaries. Following the table, I will provide a narrative summary addressing discrepancies and additional notes, including the observation that the Bifid cipher is not explicitly mentioned in the provided Gutenberg document.
  14. [14]
    Cryptanalysis of the Bifid cipher - Practical Cryptography
    We will use a Simulated Annealing algorithm to reveal it. This approach is more fully described on the page cryptanalysis of the playfair cipher, which is ...
  15. [15]
    Automated Ciphertext—Only Cryptanalysis of the Bifid Cipher
    Mar 22, 2007 · In this article, we describe a fully automated ciphertext-only cryptanalysis attack on the Bifid cipher, for which the original text language is known.Missing: weaknesses | Show results with:weaknesses