Skip to main content

Beaufort Cipher

New

Encrypt and decrypt text with the Beaufort cipher, a reciprocal Vigenère variant using the formula C = (K − P) mod 26, so the same operation both encrypts and decrypts.

beaufort cipherciphervigenerecryptographyreciprocal
Read the guide
Shortcuts:⌘ KSearch

The Beaufort cipher uses the reciprocal formula C = (K − P) mod 26, unlike the Vigenère cipher's C = (P + K) mod 26. Because the formula is symmetric, running the same operation on ciphertext with the same key recovers the plaintext — there's no separate "decrypt" mode, just one button.

Continue with:

Frequently Asked Questions

How is the Beaufort cipher different from the Vigenère cipher?

Vigenère computes each ciphertext letter as C = (P + K) mod 26, while Beaufort computes it as C = (K − P) mod 26 — a subtle formula change that makes Beaufort "reciprocal" (self-inverse), meaning encryption and decryption are literally the same operation.

Why is there only one button instead of separate encrypt and decrypt buttons?

Because the Beaufort formula is its own inverse, running it a second time on its own output with the same key always recovers the original plaintext exactly — there's no mathematical distinction between "encrypting" and "decrypting" with this cipher.

Does the key need to be as long as the message?

No — like Vigenère, the key repeats cyclically for as long as the message requires, so a short key like "FORTIFICATION" can encrypt a message of any length by cycling back to its first letter after it's used.

What happens to non-letter characters like spaces and punctuation?

They pass through completely unchanged and don't consume a position in the repeating key, so spacing and punctuation in the output line up visually with the input.

Where does the name "Beaufort" come from?

It's named after Sir Francis Beaufort, the 19th-century Royal Navy officer better known for the Beaufort wind force scale — the cipher was historically used in some naval and diplomatic signaling systems.

Related Tools