Crypto · 91 tools · nothing uploads

Four-square cipher encode

Four-square cipher encode, classical cipher, a puzzle not a protection, computed on your device. Not reversible to the exact input: only letters survive (J folds into I), a lone trailing letter gets an X filler, and output is uppercase pairs.

Input

Options

live

Four-square cipher encode reads two letters at a time from a plain unkeyed square and writes each pair through two keyed squares, key1 default EXAMPLE and key2 default KEYWORD. Unlike Playfair, a doubled letter needs no filler here, only a lone final letter gets an X appended. J is folded into I throughout, so the two letters are indistinguishable in the output.

Questions

What are key1 and key2 for?

They key the two mixed squares (top-right and bottom-left); the other two squares stay the plain unkeyed alphabet, defaulting to EXAMPLE and KEYWORD.

How does it differ from Playfair for a doubled letter?

A doubled letter needs no filler in four-square; only a lone trailing letter gets an X appended to complete the final pair.

What happens to J?

It is folded into I everywhere, so both share the same square position.

How do I decode it?

Use Four-square cipher decode with the same key1 and key2.

Is this secure?

No, it is a classical puzzle cipher with known attacks; use AES-GCM encrypt for real protection.

Can I use this from the command line?

Yes, the same code runs on the page, the CLI and MCP.

Related Crypto tools