STATION 25 / FIELD MANUAL

← Back to crypto library

Playfair

Digraph

Playfair replaces pairs of letters using a 5×5 square. It has separate rules for pairs sharing a row, sharing a column, and forming a rectangle. This version merges I/J.

How to recognise it

A keyword square, paired ciphertext, or instructions about duplicate-letter fillers can suggest Playfair. Prepared plaintext has no identical letters within one pair, but repeated letters can still occur across pair boundaries.

Worked example: encrypt BALLOON

Use the unkeyed square below. To prepare the text, insert X between a repeated pair and add X if one letter is left over. If the repeated letter is itself X, use Q as a separator instead.

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

BALLOON → BA LX LO ON
  1. BA shares row 1. Move both right, wrapping at the edge: B→C, A→B, giving CB.
  2. LX forms a rectangle. Keep each letter's row and take the other letter's column: L→N and X→V, giving NV.
  3. LO shares row 3: L→M, O→P, giving MP.
  4. ON shares row 3: O→P, N→O, giving PO.
  5. Join the pairs: CBNVMPPO. For a same-column illustration, AF would encrypt to FL by moving both letters down.

Work backwards: decrypt CBNVMPPO

Split into CB / NV / MP / PO. Move same-row letters left and same-column letters up; for a rectangle, exchange columns again. These give BA / LX / LO / ON. Rejoin as BALXLOON, then recognise the inserted X to recover BALLOON.

Conventions and common mistakes

Build a keyed square by keeping first occurrences of keyword letters, then appending unused letters. Do not remove every X from decrypted text: some are real letters. Fillers and the I/J distinction need contextual interpretation.

Useful desk reference

5×5 worksheets — Build and label the squares used by the example.

Support this project

Enjoying Advent of Cypher? If you'd like to support the project and help keep it running, you can make a small donation. Completely optional, always appreciated.