Deutsch (DE-CH-AT)English (United Kingdom)
 
 
 
 
 
   


 

PDF Print

Vigenère Cipher

 

Background

The Vigenère cipher was developed in the 16th century by the French cryptologist Blaise de Vigenère (* 15th April 1523 in Saint-Pourçain; † 1596)1. It is based on the usage of the Caesar cipher, but with changing alphabets. For long time this cipher was regarded as unbreakable. Finally, Friedrich Wilhelm Kasiski published a method to decode a text that was encoded with a Vigenère cipher.2

Vigenere

Fig. 1: Vigenère3

 

Principle

A key of arbitrary length has to be chosen. The key, and the text that will be encoded, have to use characters from the same alphabet. For demonstration purposes, we will use the capital letters A-Z only.
As an example, the sentence "DIES IST EIN GEHEIMER TEXT" (German for: “This is a secret text”) will now be decoded with the key "KEY". First, we write the key beneath the plaintext and repeat it until the whole length of the plaintext is covered…
DIES IST EIN GEHEIMER TEXT    (plaintext)
KEYK EYK EYK EYKEYKEY KEYK    (key)
Now we are using the Caesar cipher. The first character occurring in the plaintext, D is encoded by the character corresponding to the first character of the key, K. This means that the original mapping of the Caesar cipher:
Plaintext alphabet
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 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
Ciphertext alphabet

is shifted by the key 'K' to the left. The 'K' is the eleventh character in the alphabet, so we have to shift the mapping 10 positions to the left, which reads the following:

Plaintext alphabet
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
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

Ciphertext alphabet

A would thus be mapped to K, B to L, C to M and therefore the D (from our message "DIES IST EIN GEHEIMER TEXT") to the N. Therefore, the first character of the ciphertext will be O. Next, the second character in the plaintext, I, will be mapped by the Caesar cipher with a character corresponding to the second character in the key E.
E is the fifth character in the alphabet, so we have to shift the original mapping by 4 positions to the left:

Plaintext alphabet
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
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
Ciphertext alphabet

Therefore, the I will be mapped to the M. The encoded text so far is NM. If we encode the whole message with the same procedure we will get the encoded text: "NMCC MQD IGX KCRIGWIP DIVD".

 

Security

In the preceding example, we have chosen a key, which is significantly shorter than the plaintext. If we had used a longer example, it would have become clear that we are simply using 3 different Caesar ciphers over and over again. It is obvious that the security depends on the length of the key. If the key has only a length of one (the passphrase is only one letter) then the Vigenère cipher would be identical to just using the Caesar cipher. Usually the first step for an attacker would be to identify the length of the key. If the length is known, the attacker just has to perform frequency analyses for different Caesar ciphers.
The special case where the key-length is identical with the length of the plaintext is called Vernam cipher. This cipher is much harder to crack but still not secure. With sufficiently long texts, key- as well as natural language, an attacker can exploit the property that the different characters in the plaintext, key and encoded text do not occur with an equal frequency and run a frequency analysis. This cipher can be made secure by using a random sequence of characters for the key, this is called a One-Time-Pad and it is unbreakable.4

 

Details

In contrast to the Caesar cipher, a plaintext-character is not always mapped to the same ciphertext character. The mappings are dependent on the key length.
The Vigenère cipher belongs therefore to the class of polyalphabetic ciphers. In practice, the Vigenère cipher is applied by using the Vigenère square. The Vigenère cipher can be considered as a consecutive application of different Caesar ciphers. One has to simply look up the line for the respective Caesar cipher to find the encoded text character.
vigenere-quadrat
Fig. 2: Vigenère-Square5

 

Weblinks

http://en.wikipedia.org/wiki/Vigenère

 

References

1 o.V.: "Blaise de Vigenère", http://de.wikipedia.org/wiki/Blaise_de_Vigenère, 2009-02-20
2 o.V.: "Geschichte der Kryptographie", http://krypto.informatik.fh-augsburg.de, 2009-02-11.
3 http://en.wikipedia.org/wiki/File:Vigenere.jpg, 2009-02-11.
4 Schmeh, Klaus: "Kryptografie", dpunkt.verlag, 2007, P. 47
5 Brätz, Marcel: "Kryptographiespielplatz", http://www.kryptographiespielplatz.de

 

 
   
     
 
 
Copyright © 1998 - 2016 CrypTool Project / Contributors