# Beaufort cipher

The **Beaufort cipher,** created by Sir , is a similar to the , with a slightly modified enciphering mechanism and . Its most famous application was in a rotor-based cipher machine, the . The Beaufort cipher is based on the Beaufort square which is essentially the same as a Vigenère square but in reverse order starting with the letter “Z” in the first row, where the first row and the last column serve the same purpose.

## Contents

## Using the cipher

To encrypt, first choose the plaintext character from the top row of the tableau, call this column P. Secondly, travel down column P to the corresponding key Letter K. Finally, move directly left from the Key letter to the left edge of the tableau, the CipherText encryption of Plaintext P with Key K will be there.

For example if encrypting Plain text character “d” with Key “m” the steps would be:

- find the column with “d” on the top,
- travel down that column to find Key “m”,
- travel to the left edge of the tableau to find the CipherText letter (“J” in this case).

To decrypt, the process is reversed. The Beaufort cipher is a , that is, Decryption and Encryption algorithms are the same.

## Algebraic description

The Beaufort cipher can be described algebraically. For example, using an encoding of the letters `A`–`Z` as the numbers 0–25 and using addition 26, let be the characters of the message, be the characters of the cipher text and be the characters of the key, repeated if necessary. Then Beaufort encryption can be written,

- .

Similarly, decryption using the key ,

- .

## Decrypting as a Vigenere cipher

Due to the similarities between the **Beaufort cipher** and the it is possible, after applying a transformation, to solve it as a . By replacing every letter in the ciphertext with its opposite letter (such that ‘a’ becomes ‘z’, ‘b’ becomes ‘y’ etc.) it can be solved like a .

## Distinguished from ‘variant Beaufort’

The Beaufort cipher should not be confused with the “variant Beaufort” cipher. In variant Beaufort, encryption is performed by performing the decryption step of the standard Vigenère cipher, and likewise decryption is performed by using Vigenère encryption.