Using the four-square tool
Type two keys, one for each keyed square, and the message. Decoding needs both keys in the same order. Letters only, in capitals, and Q is dropped because the squares have 25 cells.
An odd letter at the end gets an X. That's why decoded messages sometimes end in one.
How it works
Lay out four 5x5 squares in a block, two across and two down, so the whole thing looks like one big square with a cross through the middle. The top-left and bottom-right squares hold the plain alphabet. The top-right is filled from the first key and the bottom-left from the second, each key first and then the rest of the alphabet, skipping repeats.
Take the message two letters at a time. Find the first letter in the top-left square and the second in the bottom-right. The first cipher letter is in the top-right square, on the first letter's row and the second letter's column. The second cipher letter is in the bottom-left, on the second letter's row and the first letter's column.
With the keys EXAMPLE and KEYWORD, HE becomes FY, and "help me Obi Wan Kenobi" becomes FYGMKYHOBXMFKKKIMD. That is Wikipedia's own example.
Delastelle's third cipher
The four-square is another invention of Félix Delastelle, the French cryptographer behind the bifid and trifid. Like the Playfair cipher it works on pairs of letters, but it needs no special rule for a doubled pair like LL.
Questions
Why is Q missing?
Each square has 25 cells for 26 letters, so one letter has to go. Wikipedia's example leaves out Q. Other versions merge I and J instead.
How is four-square different from Playfair?
Playfair uses one keyed square and needs rules for letters on the same row or column. Four-square uses two keyed squares and always forms a rectangle, so a doubled letter needs no splitting.
Which key goes where?
Here the first key fills the top-right square and the second fills the bottom-left. Swap them and the cipher text changes.
Sources
Added and reviewed . What's new



