Cypher system invented in the mid 16-th Century by French diplomat Blaise de Vigeneres. To use the cypher, you first need a copy of the following table (from which the cypher takes its name):

  | 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 
--------------------------------------------------------
1 | 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
2 | 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 
3 | 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
4 | 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
5 | 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
6 | 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
7 | H I J K L M N O P Q R S T U C W X Y Z A B C D E F G 
8 | 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 
9 | J K L M N O P Q R S T Y V W X Y Z A B C D E F G H I
10| 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
11| 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
12| 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
13| 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
14| 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
15| 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 
16| 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
17| 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
18| 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
19| 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
20| 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
21| 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
22| 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 
23| 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
24| 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
25| 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
26| 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

Each line in this table represents an alphabet with a different caesar shift. You also need to choose a keyword, which defines which alphabet you use for a given letter in the message - the first letter in the plaintext is encoded according to the alphabet which begins with the first letter of the keyword, and so on.

For instance, to encrypt the first line of Byron's poem The Destruction of Sennacherib using the keyword "nothing":


Key  : nothingnothingnothingnothingnothingno
Plain: TheAssyriancamedownlikeawolfonthefold
code : GVXHAFENWTUKNSRRHDVYOXSTDWYLBBMOMSUYR

To decrypt the message, simply re-apply the cypher in the opposite direction.

Prior to the introduction of computers, the Vigeneres cypher was a reasonably secure method of encryption for short messages (i.e. no more than a few repetitions of the keyword).In 1854, however, Charles Babbage was able to demonstrate that, when the cypher is used to encrypt a long message, the length of the keyword can be determined by analysis of repeating patterns in the text.

For instance, if a particular three-letter sequence occurs twice in the text, 95 letters apart, then we assume that the two occurrances are encryptions of the same three-letter word, and the keyword is a factor of 95 (i.e. 5 or 19) letters long. Analysis of other repeating patterns should more completly describe the length of the keyword, and once this is known the cypher is vulnerable to frequency analysis.