Skip to content
All tools
Classical cryptoRuns locallyNo account

Playfair cipher decoder

Decrypt Playfair with a known keyword, using the 5x5 digraph square. Recognisable by its even length and total absence of doubled letters.

Open in ctfpal

Playfair encrypts pairs of letters using a 5x5 square built from a keyword, with I and J sharing a cell. Because it works on digraphs rather than single letters, single-letter frequency analysis is useless against it - which is what made it a genuine field cipher for decades.

Recognising it

  • The ciphertext length is always even.
  • The letter J never appears (it was merged into I).
  • No digraph ever contains a doubled letter - LL cannot occur in a pair, because the encoder inserts an X to split them.
  • Stray X characters at odd positions in the recovered plaintext are the padding, not part of the message.

The three encryption rules - same row, same column, rectangle - all reverse cleanly, so decryption with a known keyword is mechanical. Without the keyword, Playfair yields to simulated annealing on digraph statistics, which needs a good deal more ciphertext than a monoalphabetic break.

Related tools