Beaufort Cipher

The Beaufort Cipher is a polyalphabetic substitution cipher that was invented by Sir Francis Beaufort in the 19th century. The cipher is closely related to the Vigenère Cipher but works slightly differently. Unlike the Vigenère Cipher, the Beaufort Cipher uses a reversed encryption and decryption algorithm, which means the ciphertext is produced by reversing the order of the alphabets used in the Vigenère method. This unique approach makes it distinctive and more challenging to break compared to similar ciphers.

The Beaufort Cipher was historically used in military applications due to its robustness in creating encrypted messages that are harder to decipher through simple cryptanalysis. Although it is not commonly used today, it stands as an important part of cryptographic history and was utilized up until more advanced encryption techniques became standard.

To encrypt with the Beaufort Cipher, one uses a keyword, and the plaintext characters are "subtracted" from the keyword characters rather than added, as with the Vigenère Cipher. This results in an encryption pattern that is inverse to Vigenère.

Example

Let’s say the keyword is ROYAL and we want to encrypt the plaintext ATTACK.

  1. Key: ROYAL repeated as necessary to match the length of the plaintext.
  2. Resulting Key Sequence: ROYALR.

Each letter in the plaintext is encrypted by using the Beaufort Cipher's reversed alphabet calculation.

PlaintextKeyCiphertext
ARR
TOV
TYL
AAZ
CLJ
KRR

So, ATTACK encrypted with the keyword ROYAL using the Beaufort Cipher would yield RVLZJR as the ciphertext.