Vigenère Cipher
The Vigenère (vee-shuh-nair) cipher is a method of encrypting plaintext using multiple rows of rotation ciphers and letters of a keyword. This cipher is much harder to crack because it hides letter frequencies. However, it does require an extra secret keyword and the encoding and decoding process is a little more involved. To begin, write a complete set of letters, in order, along one row and one column to create a grid as follows:
Next, fill in each row with a shifted alphabet starting with the given letter in that row. This is basically rot-n for all values of n.
We have created a Vigenère table which will be used to both encrypt and decrypt messages. In addition, both sender and receiver will need to agree on a secret code word, this will be used in creating the key. In this case, we will use the secret keyword “lemonade.”
----------------------------------------------
Plaintext: severe water shortage on the island
Keyword: lemonade
----------------------------------------------
Eliminate the spacing and make the key by repeating the keyword until it has the same number of letters as the plaintext message.
Text: severewatershortageontheisland
Key: lemonadelemonadelemonadelemona
To use the Vigenère table, find the plaintext letter across the first row and the key letter down the first column. Follow these to the associated ciphertext letter in the body of the table. For example, find the first plaintext letter s across the top row, then the key letter l down the first column, this leads to the first ciphertext letter d.
Plaintext: severe water shortage on the island
Keyword: lemonade
----------------------------------------------
Eliminate the spacing and make the key by repeating the keyword until it has the same number of letters as the plaintext message.
Text: severewatershortageontheisland
Key: lemonadelemonadelemonadelemona
To use the Vigenère table, find the plaintext letter across the first row and the key letter down the first column. Follow these to the associated ciphertext letter in the body of the table. For example, find the first plaintext letter s across the top row, then the key letter l down the first column, this leads to the first ciphertext letter d.
Text: severewatershortageontheisland
Key: lemonadelemonadelemonadelemona
Cipher: d
Now continue in this fashion with the plaintext across the top and the key down the first column.
-----------------------
Text: severewatershortageontheisland
Key: lemonadelemonadelemonadelemona
Cipher: dihseezeeidguouxlkqcatkitwxoad
Grouped: dihse ezeei dguou xlkqc atkit wxoad
-----------------------
You might notice that the most common letter e is encoded using different letters throughout the ciphertext. This shows that the Vigenère cipher combats code breakers using standard letter frequency analysis.
The Vigenère cipher was invented in the 1500’s and for hundreds of years it was considered unbreakable. However, in the 1800’s it was cracked by Charles Babbage (pictured above), who by the way, is credited for coming up with the idea of a digital programmable computer.
To decode Vigenère ciphertext, you will need the keyword used to encode it.
For example, the returning message above was made using the same keyword “lemonade.” Repeat the keyword until it has the same number of characters in the ciphertext.
Plaintext:
Key: lemonadelemonadel
Cipher: hefsewdwdizhgogej
Look at the l in the key column, follow that along the row to h found in the ciphertext, then follow that column up to the plaintext letter w.
Plaintext:
Key: lemonadelemonadel
Cipher: hefsewdwdizhgogej
Look at the l in the key column, follow that along the row to h found in the ciphertext, then follow that column up to the plaintext letter w.
Plaintext: w
Key: lemonadelemonadel
Ciphertext: hefsewdwdizhgogej
Follow e to e then up to a. Next, m to f up to t.
Plaintext: wat
Key: lemonadelemonadel
Ciphertext: hefsewdwdizhgogej
Continuing in this way we have,
-----------------------------------------
Plaintext: waterwassenttoday
Key: lemonadelemonadel
Ciphertext: hefsewdwdizhgogej
------------------------------------------
Now we know that water was sent today.
To use the Vigenère cipher, remember that the key is the first column, the ciphertext is found in the body of the table, and the plaintext is obtained from the first row.
The Enigma machine used in WWII, pictured above, electro-mechanically replaced each character with a different character from a rotated alphabet like the Vigenère cipher. Such ciphers are called polyalphabetic substitution ciphers.
-----------------------
Mission 13: Encode the message using the Vigenère cipher and keyword “greenhouse.”
abort mission immediately
-----------------------
Mission 14: Decode the message using the Vigenère cipher and the keyword “workhorse.”
xsxsu sjuel sdskb zylp
-----------------------
-----------------------
Mission 13: Encode the message using the Vigenère cipher and keyword “greenhouse.”
abort mission immediately
-----------------------
Mission 14: Decode the message using the Vigenère cipher and the keyword “workhorse.”
xsxsu sjuel sdskb zylp
-----------------------