DecipherTechnical reference

Ciphers

Playfair cipher

A 5×5 Key square encrypts two letters at a time.

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

RelationshipEncryption
Same rowreplace each letter with the cell to its right, wrapping
Same columnreplace each letter with the cell below it, wrapping
Rectanglekeep each row and take the other letter’s column
Elements of CryptanalysisACA Playfair

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

One pair in a published training square
Square
LOGAR / ITHMB / CDEFK / NPQSU / VWXYZ
Plain pair
CO
Relationship
rectangle
Cipher pair
DL
ACA Playfair

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

  1. U.S. Office of the Chief Signal Officer, Elements of Cryptanalysis
  2. American Cryptogram Association, Playfair instructions
  3. Helen Fouché Gaines, Cryptanalysis
  4. Menezes, van Oorschot, and Vanstone, Handbook of Applied Cryptography, chapter 7
  5. William F. Friedman and Lambros D. Callimahos, Military Cryptanalytics, Part I