The four-square cipher
is a manual symmetric encryption
technique. It was invented by famous French cryptographer Felix Delastelle
The technique encrypts pairs of letters (digraphs
), and thus falls into a category of ciphers known as polygraphic substitution cipher
. This adds significant strength to the encryption when compared with monographic substitution cipher
which operate on single characters. The use of digraphs makes the four-square technique less susceptible to frequency analysis
attacks, as the analysis must be done on 676 possible digraphs rather than just 26 for monographic substitution. The frequency analysis of digraphs is possible, but considerably more difficult - and it generally requires a much larger ciphertext in order to be useful.
The four-square cipher uses four 5 by 5 matrices arranged in a square. Each of the 5 by 5 matrices contains the letters of the alphabet (usually omitting "Q" or putting both "I" and "J" in the same location to reduce the alphabet to fit). In general, the upper-left and lower-right matrices are the "plaintext squares" and each contain a standard alphabet
. The upper-right and lower-left squares are the "ciphertext squares" and contain a mixed alphabetic sequence.
To generate the ciphertext squares, one would first fill in the spaces in the matrix with the letters of a keyword or phrase (dropping any duplicate letters), then fill the remaining spaces with... Read More