IT lexicon › Security › Playfair cipher

Playfair cipher

Security På svenska → Updated: 2026-10-11

Encrypts letters in pairs using a keyword-filled 5×5 grid. Invented by Wheatstone, named after the friend who did the selling.

Charles Wheatstone devised the cipher in 1854, but it was Lyon Playfair who lobbied the British government to adopt it, and the name went to the lobbyist. A keyword fills a 5×5 grid (I and J share a cell) and the plaintext is split into letter pairs. Each pair is replaced according to whether its letters share a row, share a column, or form the corners of a rectangle.

Working in pairs gives roughly 600 digraphs to analyse instead of 26 letters, which was plenty for field use where the enemy only had to be kept out for a few hours. The British used it in the Boer War and the First World War, and the messages that got John F. Kennedy's crew rescued after PT-109 sank in 1943 went out in Playfair. Given digraph statistics and enough text, it falls all the same.

← Back to the lexicon