The Vigenère cipher is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers based on the letters of a keyword.
The key word or phrase can be anything. The trick is that both parties MUST know the key in order for the code to be deciphered.
An example of this is:
- Choose your code
- Plain Text: CIPHERS ARE FUN
- Choose your key phrase
- Key Phrase: HELLOWORLD
- Drop the spaces from your code to avoid frequency tests breaking your code and repeat the key phrase sequence until there are as many letters in your key phrase as their are in your code as can be seen below
- There are many different tables you can use but the most common is shown below.
The message can be encoded using the letter of the plain text and the corresponding letter of the key phrase.
So to continue with our example, C is encoded using H. Using “C” from the Y axis and following across this row until we find “H” we then encode this letter by swapping it with the value on the X axis which would be “F”.
The script i have placed below can be used to check your ciphers or even to decode them.