Beaufort Cipher
Encode and decode using the Beaufort cipher. A reciprocal cipher similar to Vigenere.
Note: The Beaufort cipher is reciprocal - the same operation encrypts and decrypts. Enter either plaintext or ciphertext with the keyword to convert.
Beaufort Formula
C = (K - P) mod 26
P = (K - C) mod 26
Where C = ciphertext, K = keyword, P = plaintext
Beaufort vs Vigenere
- Vigenere: C = (P + K) mod 26
- Beaufort: C = (K - P) mod 26
- Key difference: Beaufort is reciprocal (encrypt = decrypt)
What is the Beaufort Cipher?
The Beaufort cipher is a polyalphabetic substitution cipher similar to the Vigenère cipher. Named after Sir Francis Beaufort (of Beaufort wind scale fame), it uses the same tabula recta as Vigenère but with a different encryption formula.
How It Works
The Beaufort cipher uses the formula: C = (K - P) mod 26
This means you subtract the plaintext letter from the key letter (instead of adding them as in Vigenère). The result is a reciprocal cipher - the same operation both encrypts and decrypts.
Reciprocal Property
Unlike most ciphers, the Beaufort cipher is reciprocal:
- To encrypt: Apply the cipher with the keyword
- To decrypt: Apply the same cipher with the same keyword
- No separate encrypt/decrypt operation needed
Example
Keyword: KEY, Plaintext: HELLO
- H (7) with K (10): (10 - 7) mod 26 = 3 = D
- E (4) with E (4): (4 - 4) mod 26 = 0 = A
- And so on...
Beaufort in Geocaching
The Beaufort cipher appears in puzzles because:
- Less common: Many solvers try Vigenère first
- Reciprocal: Interesting mathematical property
- Historical: Naval/maritime themed caches
- Easy mistake: Can confuse Vigenère solvers
Breaking the Cipher
Without the keyword:
- Kasiski examination: Find repeated sequences
- Friedman test: Determine key length
- Frequency analysis: Once key length is known
- Try Vigenère: If Beaufort doesn't work, try Vigenère
Variants
- Variant Beaufort: P = (P - K) mod 26 (different formula)
- Autokey: Key incorporates plaintext
- Running key: Key is from a text