Vignere Cipher

The Vigenere Cipher is a simple poly-alphabetic substitution cipher popularly associated with Blaise de Vigenere, though historical records show that what we now know as the Vigenere Square was originally published by Giovan Batista Belas in 1553 in his book titled 'La cifra del'. Blaise in fact invented a much stronger cipher called the auto-key cipher in 1586. This misattribution could perhaps be due to the fact that both the cipher systems utilised the tabula recta, designed by Johannes Trithemius in 1508. The tabula recta was a square that contained twenty-six rows filled with the letters of the alphabet in order with each row cyclically displaced by one position when compared to the row above it. The rows and columns were also identified with alphabets: The first row was named A and so was the first column. Likewise, the second row and the second column were identified as B. To encode a plaintext, first a random word was chosen as the key.

Vignere Cipher For example, Suppose the plain text is "This is some text" and the chosen key is "Crypto". The key and the plain text are arranged like this:

Key: CRYPTOCRYPTOCR

Plain text: THISISSOMETEXT

i.e., the key is repeated till it covers the length of the plain text. To obtain the cipher-text, the tabula recta or the Vigenere Square is used. In this example, the cell where the row C (C is the first letter of the key) and the column T (T is the first letter of the plain text) intersect gives the first letter of the plain-text V. Similarly, the cell where the row R and column H intersect gives the second letter of the cipher-text Y. This process is repeated till all the letters are enciphered. Thus the cipher text is:

Cipher text: VYGHBGUFKTMSZK

The Vigenere cipher, being a key-based poly-alphabetic substitution cipher, was initially thought to be unbreakable. Indeed, a simple frequency analysis would fail in the case of any poly-alphabetic substituion cipher since a letter in the plain text may be mapped on to more than one letter in the cipher text. Thus finding out the frequencies of each of the letters would not yield valid results. In 1854, Charles Babbage, successfully figured out a method to crack the cipher. But it was kept hushed up for years. The same method was re-invented in 1863, by Friedrich Kasiski and is now called the Kasiski Test. Later on William F. Friedman came out with the Kappa test which could be used in conjunction with the Kasiski Test to break the seemingly unbreakable Vigenere Cipher.

Reference

Wikipedia - Vigenere Cipher
http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
Java Script based web application to encode using the Vigenere Cipher.
http://sharkysoft.com/misc/vigenere/
Image source (public domain):
http://en.wikipedia.org/wiki/Image:Vigen%C3%A8re_square.svg