Professional Documents
Culture Documents
Vigenere Cipher (Practical)
Vigenere Cipher (Practical)
Vigenere Cipher (Practical)
Leon Battista Alberti in the mid 15th century wrote about an early version of what
we now call the Vigenère cipher. He used a cipher disc to encode and decode
messages. This cipher changed the substitution alphabet occasionally, marking
the new alphabet in the ciphertext. Imagine a Caesar cipher in which the shift is
denoted by a letter. The letter "A" means a shift of 0, "B" a shift of one, and so
on. If you encoded text using a Caesar cipher, changing the shift after a sentence
and writing down the new key letter, that would be a pretty good recreation of
Alberti's cipher.
Clearly, if we know the system, the ciphertext contains enough information for us
to decode it. It relied on what we call "security through obscurity", as many early
ciphers did.
We know this cipher as the Vigenère cipher due to a slight mistake in attribution.
Later in the 16th century, Blaise de Vigenère created a new, and actually more
secure, variation on Bellaso's cipher. Unfortunately, a few hundred years later the
Bellaso cipher was recorded as the work of Vigenère and although we now know
the mistake, the name has stuck.
Encoding and decoding using this cipher is not difficult, but at first it was
considered more effort than necessary. Only when it became clear that all of its
predecessors were being routinely broken by cryptanalysts did people choose to
use the Vigenère cipher. At the time, it was considered unbreakable.
1. Look at the current character in the plain text. This will be the first
character to begin with.
2. Look at the current character of the key. This will be the first character in
the key to begin with.
3. Use the table of alphabets (the Tabula Recta - below) to find the character
where the column corresponding to the key and the row corresponding to
the plain text characters intersect. Record this as the next character of
ciphertext.
4. Move to the next key character (going back to the start if there are no
more) and the next plain text character (if there is one) and go back to step
1
Let's see how this works by encoding "Mary had a little lamb", with the key
"cobalt". We won't encode punctuation or spaces and we will ignore case, so our
two strings are: MARYHADALITTLELAMB and COBALT.
MARYHADALITTLELAMB
COBALT
Use these two letters as coordinates in the table below. Find the row with the
letter M and the column with the letter C, then trace across and down to where
that row and column intersect to find the first ciphertext letter: O
Now we move to the next pair of letters.
MARYHADALITTLELAMB
COBALT
This time, the ciphertext is also O. This illustrates the big advantage that
polyalphabetic ciphers have over monoalphabetic ciphers: finding two identical
ciphertext letters doesn't mean you've found two identical plaintext letters.
Conversely, a pair of identical letters in the plaintext won't be necessarily
encoded as the same ciphertext letter. When it was invented, this property
thwarted all of the existin cryptanalysis techniques and led to it being known as
the indecipherable cipher.
A B C D E F G H I J K L M N O P Q R S T U V WX Y Z
A A B C D E F G H I J K L MN O P Q R S T U V WX Y Z
BB 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
CC 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
DD 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
EE 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
FF 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
GG 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
HH 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
JJ 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
KK L M N O P Q R S T U V WX Y Z A B C D E F G H I J
LL 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
MM 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
NN 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
OO 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
PP 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
QQ R S T U V W X Y Z A B C D E F G H I J K L MN O P
RR 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
SS 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
TT 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
UU 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
VV 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
WW 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
XX 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
YY 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
ZZ 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