Vigenere Cypher

Vigenere Cypher

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:

  1. Choose your code
    • Plain Text: CIPHERS ARE FUN
  2. Choose your key phrase
    • Key Phrase: HELLOWORLD
  3. 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
    • CIPHERSAREFUN
    • HELLOWORLDHEL
  4. 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.

 

See the Pen Vigenere Cypher by Ross (@reprintco) on CodePen.

Login to chat with other users!