Four-square — Four five-by-five grids in a square; the plaintext pair is located in the two plain grids and read out of the opposite corners of the rectangle.
Digraph substitution across two keyed 5x5 grids. No padding and no reversible pairs, unlike Playfair.
A worked example§
Encrypting a sample with the cipher itself, at build time:
MEET ME BY THE OLD CLOCK TOWER AT DAWN
Key: top=EXAMPLE, bottom=KEYWORD
produces the ciphertext
NEMSNEMURBMLKKEHIWDSHXXSMMEWWG
This example is generated by running the cipher when the page is built, and the round trip is checked, so it always matches what the solver does.
How it is broken§
Fifty key cells — two Playfair grids — so a from-scratch search does not finish. With either keyword known the rest follows quickly.
History and context§
Delastelle again. It fixes Playfair's two embarrassments: doubled letters need no padding, and no pair ever encrypts to itself reversed.
See also§
Playfair · Bifid · Hill cipher (matrix) · Trifid
Browse every cipher in the Polygraphic ciphers family, read the history of codebreaking, or return to the wiki main page.
Frequently asked questions§
How is the Four-square broken?
Fifty key cells — two Playfair grids — so a from-scratch search does not finish. With either keyword known the rest follows quickly.
What key does the Four-square use?
two keywords. The keyspace is unbounded in practice.
How much ciphertext do I need?
At least 60 characters for this solver to attempt it; short messages can be readable and still not be proof.
Can I break a Four-square on this page?
Not with the browser build, which targets the common puzzle families. The desktop version searches it: see the Windows app page.