The Playfair cipher
Encrypting letters two at a time in a 25-cell square

Munro, John, 1849-1930 — Public domain — Wikimedia Commons
In brief
Invented in 1854 by the physicist Charles Wheatstone and championed by his friend Lyon Playfair, this cipher transforms letters in pairs using a square filled from a keyword. Stronger than simple substitutions, it was used by the British army until the First World War.
The story
You fill a 5 by 5 square with a keyword, then with the rest of the alphabet. You split the message into pairs of letters. If both letters are on the same row, take their right-hand neighbours; in the same column, the ones below; otherwise, take the opposite corners of the rectangle they form. So the same letter changes depending on its neighbour.
Wheatstone showed it to the British Foreign Office, which found it too complicated. He replied that he could teach it to schoolboys in a quarter of an hour; an official is said to have answered that he would never manage it with diplomats. The cipher ended up named after Playfair, who made it known. It was used in the Boer War and the First World War, then by Australian coastwatchers in the Pacific in 1943.
Example
You encrypt in pairs: HE LX LO… A pair of letters on the same row of the square is replaced by its right-hand neighbours.
Did you know?
In 1943, it was through a Playfair message sent by an Australian coastwatcher that the US Navy learned where the survivors of a boat commanded by the young John F. Kennedy were.
Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.
The Polybius square
The Caesar cipher
Trithemius’s tabula recta
Mary, Queen of Scots’ cipher letters
The Vigenère cipher
The Great Cipher of Louis XIV
The Hill cipher