Beaufort Cipher
Enciphers letters with the Beaufort cipher, a reciprocal Vigenere variant where each output letter is key minus plaintext mod 26, so the key also decodes.
Cifrado
—
The classical cipher that undoes itself
Anyone working through classical ciphers hits the same wall: Vigenere, Beaufort and the Beaufort variant share one tabula recta, have nearly identical formulas, and give different answers. When your exercise disagrees with the answer key you cannot tell whether you botched the arithmetic or picked the wrong convention. Watching the subtraction happen letter by letter settles it faster than rereading the definition.
Beaufort computes C = (K − P) mod 26, with the key repeating cyclically across the text. Flipping the subtraction has one elegant consequence: the cipher is an involution. Encrypting the ciphertext with the same key gives the plaintext back. HELLO under the key KEY becomes DANZQ; DANZQ under KEY returns HELLO. Vigenere, which adds (P + K), does not behave that way, and the Beaufort variant (P − K) is not an involution either.
The text field upper-cases your input and drops everything outside A-Z, accents included, so transliterate before pasting. The key is taken as typed, and non-letter characters in it produce meaningless shifts rather than an error message; an empty key yields blank output. Fine for coursework, CTFs and geocaching puzzles, useless for real secrecy: a few dozen letters of ciphertext are enough for the index of coincidence to expose the key length. Everything is computed in your browser, with no data sent anywhere.
Frequently asked questions
How do I decrypt?
How is it different from Vigenere?
Can I use digits, spaces or accents?
Related Tools
Polybius Cipher
Encode text with the Polybius cipher (5x5 square, I/J merged). Each letter becomes a row/column digit pair. Useful for puzzles and classical cryptography.
Interactive Alberti Cipher Disk
Alberti cipher disk with two rotating rings — rotate the inner ring and encrypt/decrypt letter by letter.
Vernam Cipher (One-Time Pad)
XORs your text byte by byte against a key and prints the ciphertext in hex. A short key repeats, so it is a true one-time pad only if it matches the length.
Vigenère Autokey Cipher Encoder and Decoder
Enciphers or deciphers text with the classic autokey variant, where the plaintext extends the keyword instead of repeating it. Letters A to Z only.
Columnar Transposition Cipher
Encrypts or decrypts text by writing it in rows under a keyword and reading the columns in alphabetical key order, padding the last row with X.
Hill Cipher 2×2
Encrypt text with a 2×2 matrix mod 26 (Hill cipher) — algebraic explanation and key invertibility check.