Living in the shadow of Vigenère: Beaufort Cipher
Considered widely a variation of the Vigenère Cipher, the Beaufort Cipher is also a polyalphabetic substitution cipher that makes use of a lookup table when being encoded and decoded by hand.
The Beaufort Cipher was created by Sir Francis Beaufort, an Irish hydrographer who had a penchant for using cipher in his journals. Along with the Beaufort cipher he also created the Beaufort scale, which is an empirical measure that relates wind speed to observed conditions.
Similar to other polyalphabetic ciphers it uses a keyword to encrypt the plain text. The lookup table for the Beaufort Cipher is given below and contains letters in a reverse fashion.
One of the most famous applications for this cipher was the M-209 Cipher Machine(1936) which was a machine used to encode and decode messages mostly during the Korean War. There were many such machines, but perhaps I’ll get to that some other day.
The encryption and decryption techniques for the Beaufort Cipher are the same. Using the lookup table, we locate the letter from the key on the row and the message letter on the column, and the intersection is the cipher.
The same method is followed during decryption when cipher text letters are located on the columns and key letters on the rows.
Plaintext: HELLO THERE
Keyword: OBIWAN
Ciphertext: HXXLM VUEFW
Algebraically, if the letters be denoted as A=0, B=1, C=2, etc. then the cipher text can be denoted as
Ci = [Ki-Mi]%26
Mi = [Ki-Ci]%26
Below is an implementation for the same
The above given example makes use of the standard key technique, which repeats the keyword until the length of the key and message are equal. The Beaufort cipher may also make use of the autokey cipher, which you can read more about in the Vigenère cipher.
The tableau that I have displayed above has been argued upon, and in many instances, the Vigenère table is used to encode Beaufort Ciphers.
Try out Beaufort Cipher!