Toolstia / Four-square cipher
Four-square cipher
The four-square cipher encrypts pairs of letters using four 5 by 5 squares, two of them built from keywords. Enter two keywords, choose encrypt or decrypt and see the squares used.
Four-square uses four 5 by 5 squares: two plain alphabet squares and two squares built from your keywords. Each pair of letters is found in the plain squares and replaced by the letters at the other two corners of the rectangle they make. J is treated as I, and only letters are used.
How it works
- Enter the two keywords.
- Choose encrypt or decrypt and type the text.
- Copy the result and check the squares.
How it works
Each pair of letters is found in the two plain squares. The cipher letters are the other two corners of the rectangle, taken from the two keyword squares.
Letters only
J is treated as I, and only letters are used. If the number of letters is odd, an X is added at the end.
Keywords
A keyword is written first with repeated letters removed, and the rest of the alphabet follows.
History
Felix Delastelle invented it around 1900, and it was stronger than the Playfair cipher.
Questions
Is my text sent anywhere?
Everything happens in your browser, and nothing you enter is sent anywhere.
Do I need both keywords?
Both are optional. Leaving one empty gives the plain alphabet square, but two keywords give a stronger result.
Is it secure today?
No. Computers break it easily, so use it for puzzles and learning.