How to Encode and Decode Using the Vigènere Cipher
The Vigènere cipher is one of the classic ciphers, and was widely regarded as unbreakable from the 16th century through to the late 19th century. Although cryptanalysts have since proved this wrong, it's still a challenging cipher for non-professionals and can be a fun way to develop mathematical skills as well as cryptography knowledge.
Instructions
-
Encrypt
-
1
Pick a plaintext message. This message can be any text at all, but shouldn't include punctuation or else it will be difficult to encrypt while retaining the meaning. Also, don't use the word "stop" to indicate periods.
-
2
Select a key, a sequence of letters to encrypt with, that's not longer than the plaintext message. This key is traditionally not a random sequence of letters, but is a word or words. Repeat the key until it matches the length of the plaintext.
-
-
3
Shift the plaintext a character at a time according to the distance of the matching key character.
-
4
Repeat the character replacement process until you've converted all of the plaintext. If the plaintext is longer than the key, start the key over again where it ends.
Decrypt
-
5
Use the key to reverse the encryption, shifting in the opposite direction. For example, you would go back two characters for the "c" example in Section 1. Without the key, you'll have to use the steps below.
-
6
Copy the encrypted message and place that copy below the original, with the copy being one character shift to the right. Note the number of coincidences. Do this until you're finished with 75 percent of the message. The highest number of coincidences should indicate the length of the key.
-
7
Use frequency analysis by determining which characters appear most frequently within the bounds of the key length. If the message is in English, for example, the most frequently occurring letter should be "e."
-
1
Tips & Warnings
In algebra the encryption process looks a bit like this: Ci=Pi+Ki(Mod 26)
Without the key, the decryption process can be tricky. People have written entire novels without use of the letter "e," so you may have to try again with the next highest frequency letter, if the message makes no sense.
It is also possible that the key length has thrown you. Check the next highest coincidence count if all else fails.