Beaufort Cipher - Description and Cryptanalysis

Cryptography Home Classical Cryptography Classical Cryptanalysis Modern Cryptography Modern Cryptanalysis Latest Updates Links

Back to: [Classical Cryptography and list of ciphers] [Classical Cryptanalysis] [Cryptography Home]

On this page: [Introduction] [The Algorithm] [Javascript Example] [Cryptanalysis] [Code] [References]

Introduction

The Beaufort cipher, created by Sir Francis Beaufort, is a polyalphabetic substitution cipher that is similar to the Vigen�e cipher, except that it enciphers characters in a slightly different manner.

The Algorithm

The 'key' for a beaufort cipher is a key word. e.g. 'FORTIFICATION'
The beaufort cipher uses the following tableau (the 'tabula recta') to encipher the plaintext:
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
    ---------------------------------------------------
A   A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B   B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
C   C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D   D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E   E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F   F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G   G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H   H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I   I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J   J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K   K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L   L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M   M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N   N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O   O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P   P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q   Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R   R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S   S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T   T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U   U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V   V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W   W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X   X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y   Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z   Z A B C D E F G H I J K L M N O P Q R S T U V W X Y
To encipher a message, repeat the keyword above the plaintext:
FORTIFICATIONFORTIFICATIONFO
DEFENDTHEEASTWALLOFTHECASTLE
(The following assumes we are enciphering the plaintext letter D with the key letter F) Now we take the letter we will be encoding, and find the column on the tableau, in this case the 'D' column. Then, we move down the 'D' column of the tableau until we come to the key letter, in this case 'F' (The 'F' is the keyword letter for the first 'D'). Our ciphertext character is then read from the far left of the row our key character was in, i.e. with 'D' plaintext and 'F' key, our ciphertext character is 'C'.

So, the ciphertext for the above plaintext is:
FORTIFICATIONFORTIFICATIONFO
DEFENDTHEEASTWALLOFTHECASTLE
CKMPVCPVWPIWUJOGIUAPVWRIWUUK
Deciphering is performed in an identical fashion, i.e. encryption and decryption using the beaufort cipher uses exactly the same algorithm.

This process can be compared to the vigenere cipher, which uses a different algorithm, but the same tableau, for finding the ciphertext characters.

Javascript Example

The following javascript implements the Beaufort cipher.
Plaintext

keyword =

Ciphertext

Cryptanalysis

Cryptanalysis of the beaufort cipher coming soon ...

Code

I have included here some C code that does encryption and decryption of the Beaufort cipher. It is only meant to show the working of the algorithm, not be a final polished solution.
Beaufort_implementation.c

References

[1] Wikipedia has a good description of the encryption/decryption process, history and cryptanalysis of this algorithm

other sources:
Kahn, D (1973) The CodeBreakers. Macmillan: New York
Singh, Simon (2000). The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography. ISBN 0-385-49532-3. 

Choose your way out: [Classical Cryptography and list of ciphers] [Classical Cryptanalysis] [Cryptography Home]
[Modern Cryptography] [Modern Cryptanalysis]

Copyright James Lyons - 2007 - No reproduction without permission
dsplabslinuxkamilcryptojames