Ciphers
Playfair cipher
Also found as Playfair square · Wheatstone cipher
Key and preparation
Decipher uses the 25-letter alphabet ABCDEFGHIKLMNOPQRSTUVWXYZ, with J treated as I. The Key is the complete 5×5 square. Split the plaintext into pairs. Insert a filler between repeated letters in a pair and after an unpaired final letter. Decipher normally uses X, with Q when X itself needs a filler.Elements of CryptanalysisACA PlayfairGaines, CryptanalysisHandbook of Applied Cryptography, chapter 7
Pair rules
| Relationship | Encryption |
|---|---|
| Same row | replace each letter with the cell to its right, wrapping |
| Same column | replace each letter with the cell below it, wrapping |
| Rectangle | keep each row and take the other letter’s column |
To decrypt, move left for a same-row pair and up for a same-column pair. For a rectangle, use the same exchange of columns as encryption.
Worked example
- Square
LOGAR / ITHMB / CDEFK / NPQSU / VWXYZ- Plain pair
CO- Relationship
rectangle- Cipher pair
DL
What to look for
Playfair hides ordinary single-letter substitution, so pairs matter more. Valid ciphertext has even length and no pair with two identical letters. Pair counts and reversals, repeats, cribs, and possible square layouts are more useful than single-letter frequency alone.Military Cryptanalytics, Part IGaines, Cryptanalysis
Sources
- U.S. Office of the Chief Signal Officer, Elements of Cryptanalysis
- American Cryptogram Association, Playfair instructions
- Helen Fouché Gaines, Cryptanalysis
- Menezes, van Oorschot, and Vanstone, Handbook of Applied Cryptography, chapter 7
- William F. Friedman and Lambros D. Callimahos, Military Cryptanalytics, Part I