Beaufort cipher

Like Vigenère, but the letter is subtracted from the key letter, so encrypting and decrypting are one operation.

How it works

Named after Admiral Francis Beaufort (of the wind scale), this cipher uses a repeated key like Vigenère but computes $c_i = (k_i - p_i) \bmod 26$. Solving for the plaintext gives $p_i = (k_i - c_i) \bmod 26$, the same formula: the cipher is reciprocal, and the Hagelin M-209 machine of the US Army used it for that reason.

The variant Beaufort, $c_i = (p_i - k_i) \bmod 26$, is simply Vigenère decryption used to encrypt. Both are polyalphabetic ciphers with a repeating key.

They are broken exactly like Vigenère: the key length shows up in repeated fragments (Kasiski) and in the index of coincidence, and each column of letters is then a reversed Caesar alphabet, solved by frequencies.

Everything is calculated in your browser. Nothing you type leaves your device.