IT lexicon › Security › Four-square cipher

Four-square cipher

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

Encrypts pairs of letters using four 5×5 grids, two of them scrambled by keywords.

Another Félix Delastelle invention. The grids sit in a square: top-left and bottom-right hold the alphabet in order, the other two are keyed. The first letter of a pair is found in the top-left grid, the second in the bottom-right, and the ciphertext is read from the keyed grids where those rows and columns intersect.

Compared with Playfair there are no special cases for letters sharing a row, and doubled letters need no padding. The security is the same kind, though: there are only 625 possible pairs, and frequency analysis on pairs instead of single letters works with a bit more ciphertext. Its main advance over its predecessor is being less annoying to use.

← Back to the lexicon