The Cambridge Cipher
← Back to Home

🔐 The Playfair Cipher

The Playfair Cipher encrypts pairs of letters (digraphs) using a 5×5 grid. It was used by the British in World War I and II.

Creating the Key Grid

  1. Choose a keyword (e.g., "MONARCHY")
  2. Remove duplicate letters from the keyword
  3. Fill a 5×5 grid with the keyword, then remaining letters
  4. I and J share the same position (25 letters fit in 25 cells)

Keyword: MONARCHY

M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z

Encryption Rules

  1. Split plaintext into pairs: HE LL O → HE LX LO (insert X between double letters)
  2. If odd length: Add X at the end
  3. For each pair, find both letters in the grid:

Same Row

Replace each letter with the one to its right (wrap around)

AR → RM

Same Column

Replace each letter with the one below (wrap around)

MU → CM

Rectangle

Replace each letter with the one in its row but the other letter's column

HE → The H row and E column → BP → The E row and H column → FH Result: HE → BF

Example Encryption

Plaintext: HELLO

1. Split: HE LL O 2. Handle doubles: HE LX LO 3. Encrypt each pair using the grid rules

How to Crack It

  1. Identify digraph frequencies: Common English digraphs are TH, HE, IN, ER, AN
  2. Look for reversed pairs: If AB encrypts to XY, then BA encrypts to YX
  3. Spot double-letter markers: X often indicates split double letters
  4. Try common words: THE becomes TH EX → look for this pattern

Tips