How to Encode and Decode Using the Vigènere Cipher
Sample Cipher and MessagesEncipherDecipher
Edited by Josh W., Flickety, Jonathan Thorne, Jack Herrick and 24 others
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.
Edit Steps
EditSample Cipher and Messages
EditMethod 1 of 2: Encipher
-
1Obtain a Vigènere Square (pictured at the end of this article) or create a Vigènere Square on your own (see the Related wikiHows).Ad
-
2Think of a keyword that is shorter than the phrase or phrases you want to encipher. For this example we will use:
LIME
-
3Write down your message without spaces. For this example we will use:
WIKIHOWISTHEBEST
-
4Write 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
-
5Cut 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
-
6Go 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.
-
7Continue on in this fashion until your entire phrase is ciphered. The example ends up as:
LAYEWGKEHLVAQWGP
EditMethod 2 of 2: Decipher
-
1Perform the above steps in reverse to decode ciphered text.
-
2Find 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.
-
3Continue on in this manner until you completely decipher the text.
-
4Finished.Ad
Edit Vigènere Square
Edit Tips
- 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.
- 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.
- There are online Vigènere Deciphers you can use to help decipher your code. Do a search to find them.
- 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.
- 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.
- 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 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.
Edit 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.
Edit Sources and Citations
- Vigènere Cipher on wikipedia
- Online Converter for ROT5, ROT13, ROT18 and ROT47, which are probably the most used Caesar ciphers in computing
Article Info
Featured Article
Categories: Featured Articles | Puzzles and Memory Games | Codes and Hidden Messaging
Recent edits by: Maluniu, Allie, Nicholas
Thanks to all authors for creating a page that has been read 176,426 times.