If you’ve been following along, you know what a Caesar cipher is. The Vigenère cipher takes that and modifies it by being polyalphabetic, which means it uses multiple substitution alphabets. The main tool to use for encrypting and decrypting is known as the tabula recta and is depicted below.

The tabula recta consists of the alphabet written out 26 times in different rows. Each of these alphabets is then shifted by one letter compared to the previous alphabet. Sound familiar? They correspond to the 26 possible Caesar cipher alphabets. So how does the Vigenère cipher actually use this table? Let’s use our example from before where Caesar is trying to tell his generals this message.
YOU WILL ATTACK AT DAWN AND TAKE NO PRISONERS
Now let’s pick a key to use to encrypt and decrypt the message. Note that the key is an actual word and not just a number to shift by. Let’s use the following word as the key.
CAESAR
You use this key in the following way to encrypt the message. Repeat the key over and over for the length of the message and line it up to the letters like so.
YOU WILL ATTACK AT DAWN AND TAKE NO PRISONERS CAE SARC AESARC AE SARC AES ARCA ES ARCAESARC
Then use the tabula recta to encrypt the message. Find the row with the plaintext letter and the column with the key letter, this results in the encrypted letter. For example find row “C” column “Y” their intersection is letter “A” thus the first letter in the encrypted message is “A.” In the image the Red segment represents step 1, the blue section indicates step 2, and the green letter is the result.

Follow the same principles for the rest of the message to get the encrypted message which is this.
AOY OICN AXLATM AX VANP ARV TRME RG PIKSSFEIU
Let compare that to the Caesar cipher encoded message.
CSY AMPP EXXEGO EX HEAR ERH XEOI RS TVMWSRIVW
Both look like a garbled mess to the normal onlooker, however trying to decrypt the message encrypted with the Vigenère cipher is exponentially more difficult to crack, both the message and the key.
Similar to encryption, decryption follows a similar method. Find the key letter row, then find the encrypted letter within that row. The column in which that resides is the decrypted letter. For example, go to row “C.” Then find the letter “A” within that row. Then look at the column that letter is in, which is “Y.” In the image above used for encryption, the red section represents step 1, the green letter is step 2, the blue line is step 3, which results in the blue letter. Following this principle, you can decrypt the message back to “ATTACK AT DAWN AND TAKE NO PRISONERS.” In my next post I will use the described principles, a part of the encrypted message, and plaintext (decrypted) message to derive the key programmatically.





Recent Comments