Encode and Decode Using the Vigènere Cipher

The Vigènere cipher is a method of encryption that uses a series of different "Caesar ciphers" based on the letters of a keyword. In a Caesar Cipher, each letter in the passage is moved a certain number of letters over, to be replaced by the corresponding letter. For example, this would mean that in a Caesar cipher shift of three: A would become D; B would become E; C would become F etc. A Vigènere cipher builds on this method by using multiple Caesar ciphers at different points in the message; this article shows you how to use it.

Steps

Sample Cipher and Messages

Doc:Vigenere Square,Long Vigenere Message

Encipher

  1. Obtain a Vigènere Square (pictured at the end of this article) or create a Vigènere Square on your own (see the Related Articles).
  2. Think of a keyword that is shorter than the phrase or phrases you want to encipher. For this example we will use:
    LIME
  3. Write down your message without spaces. For this example we will use:
    WIKIHOWISTHEBEST
  4. Write the keyword under your message, carefully lining each letter up with a letter from your message. Do this until you run out of message:
    WIKIHOWISTHEBEST

    LIMELIMELIMELIME
  5. Cut the keyword to fit the phrase if needed. In the example used for this article, the word
    LIME
    fits perfectly but when the keyword is not a perfect fit, there is no need to use the full word. For example:
    WIKIHOWISTHEBESTOFTHEBEST

    LIMELIMELIMELIMELIMELIMEL
  6. Go to the row of the first letter of the keyword in the Vigènere Square and go to the column of the first letter of the actual message and find the intersection point of the row and column. That's your cipher letter.
  7. Continue on in this fashion until your entire phrase is ciphered. The example ends up as:
    LAYEWGKEHLVAQWGP

Decipher

  1. Perform the above steps in reverse to decode ciphered text.
  2. Find the column of the first letter of the ciphered text, and go over until you reach the row of the first letter of the keyword. That letter is the first letter of the encoded phrase.
  3. Continue on in this manner until you completely decipher the text.
  4. Finished.

Vigènere Square

Tips

  • When giving this to someone else, they need to know the keyword to decipher the code, so secretly whisper it to them or use a predetermined Caesar cipher to encipher the keyword as well.
  • There are online Vigènere Deciphers you can use to help decipher your code. Do a search to find them.
  • Another method of encryption is to find a corresponding letter in a row and column intersection. In this case "letter W and L is H" and so on. WIKIHOWISTHEBEST becomes HQWMSWIMDBTIMMEX.
  • Double check to make sure you encipher correctly. An erroneously enciphered text can be impossible to interpret correctly, and it is difficult to recognize a mistake without a double-check.
  • If you use a larger Vigènere square which includes both punctuation and spacing, the cipher becomes more difficult to break. This is especially so when the "keyword" or "key phrase" is as long or longer than the message.
  • Another method to further obfuscate your message is to Caesar cipher the original message using a predetermined value (for example: Like ROT13), then run it through a Vigènere cipher. Even if decoded, without knowing the result has been Caesar ciphered before the Vigènere cipher is used, it will still appear to be gibberish.
  • The more often your "Keyword" or "Key Phrase" repeats the more easily patterns are detected in the encrypted text and the easier it is to break the cipher. A "Key" as long or longer than the length of the message is preferable.

Warnings

  • This cipher is not fool-proof (no cipher is) and can be quickly cracked. By current standards, the Vigènere cipher is extremely weak. Do not use this for anything truly top-secret. For stronger encryption research AES and RSA. This cipher can, however, be used with a one time pad (a truly random encryption key the same length as the text that is only used once) to produce a cipher text that, as long as the key is secure, can not be cracked.

Related Articles

Sources and Citations