The classical Beaufort cipher subtracts each message letter’s position from its key letter’s position. With A = 0 through Z = 25, the rule is C = (K − P) mod 26. The order matters: Beaufort is not the same calculation as Vigenère.

How the Beaufort key works

Enter an A–Z key and repeat it over the message letters. Spaces and punctuation stay in place without taking up a key letter. Using the same key again reverses the result, because K − (K − P) = P.

Subtract the message from the key

InputHELLO
SettingsKey KEY; classical reciprocal Beaufort; A = 0
Expected resultDANZQ
Try this method
InputKeyK − PResult
H (7)K (10)10 − 7 = 3D
E (4)E (4)4 − 4 = 0A
L (11)Y (24)24 − 11 = 13N
L (11)K (10)10 − 11 = −1 → 25Z
O (14)E (4)4 − 14 = −10 → 16Q

Decode with the same key

Enter DANZQ with key KEY. D has index 3, and the first key letter K has index 10: 10 − 3 = 7, or H. Continue with the repeated key to recover HELLO. If you are checking a result from another tool, confirm that it uses classical Beaufort too.

Try one yourself

What does ABC become with a one-letter key D?

Keep exploring

Vigenère cipher toolHow modulo 26 wraps around the alphabetHow text conversion and preparation work