The Digraph cipher, often associated with the Playfair cipher developed by Charles Wheatstone in 1854, is a digraph substitution cipher that encrypts pairs of letters instead of single letters, increasing security over simple monoalphabetic ciphers. A 5×5 matrix is created using a keyword, in this case KEY, filling in the remaining letters of the alphabet in order (typically merging I and J into one cell). The plaintext is split into digraphs (two-letter pairs), padding with a filler letter like X if needed. Each pair is encrypted based on their positions in the matrix: if both letters are in the same row, each is replaced by the letter to its immediate right; if in the same column, each is replaced by the letter immediately below; otherwise, each letter takes the position at the intersection of its row with the other letter’s column. For example, using the keyword KEY, “EN” might encrypt to AL, “CO” to HI, and “DE” to LD, resulting in the ciphertext ALHILD. Decryption reverses the process using the same matrix and rules. The Digraph cipher was historically used in military and diplomatic communication because it obscures single-letter frequencies and resists simple frequency analysis. Its security depends on the key matrix and proper handling of repeated letters and padding. Practicing with inputs like “ENCODE” and keys like KEY demonstrates how digraph encryption transforms simple plaintext into a less predictable ciphertext while maintaining a fully reversible and symmetric system. This method highlights early cryptographic ingenuity in moving beyond single-letter substitution and exploring positional relationships within letter pairs, forming a foundation for more advanced polygraphic ciphers used in later cryptography.

Digraph de|en-coder