Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Caesar Cipher Tutorial

The Shift (or Caesar) Cipher is another mono-alphabetic substitution cipher. Although more secure than
the Atbash Cipher, it is still an easy cipher to break, especially by today's standards.

This describes what we would now call a shift of 3, and describes the cipher that Caesar used quite well.
That is, "a" was encrypted as "D", "b" as "E", etc. The table below gives the plaintext alphabet and the
ciphertext alphabet to show how a shift of 3 could be depicted.

A Caesar Shift of 3. This was the key that Caesar himself used.

For a Caesar shift we have a key. The key is the number by which we shift the alphabet, since this
provides a unique way to describe the ciphertext alphabet easily.

Encryption
Encryption using the Shift Cipher is very easy. First we must create the ciphertext alphabet, which as
discussed above is simply found by 'shifting' the alphabet to the left by the number of places given by
the key. Thus a shift of 1 moves "A" to the end of the ciphertext alphabet, and "B" to the left one place
into the first position. As the key gets bigger, the letters shift further along, until we get to a shift of 26,
when "A" has found its way back to the front. We have already seen a shift of 3 in the table above, and
below we have a shift of 15.

The ciphertext alphabet for a Sihft of 15.

Once we have created the table, the encryption process is easy, as we just replace each occurence
within the plaintext of a letter with the corresponding ciphertext letter as given by the ciphertext
alphabet. Hence, if we wanted to encrypt the plaintext "julius caesar" with the key he himself used,
namely 3, we look along the plaintext alphabet row in the first table to find "j", and note that this
encrypts to "M". We then look for "u", and take the ciphertext letter "X". Continuing in this way, we
finally encrypt to "MXOLXV FDHVDU".

Decryption
Decryption by the intended recipient of a ciphertext received that has been encrypted using the Shift
Cipher is also very simple. One can either use the table already created above, and find each letter of the
ciphertext in the bottom row, and replace with the corresponding plaintext letter directly above it, or
the recipient could create the inverse table, with the ciphertext alphabet on top, and using a shift of 3
on it, which gives the table below.

To decrypt a message encoded with a Shift of 3, generate the plaintext alphabet using a shift of
3.
Caesar Cipher Tutorial
Clearly, the encryption table and its inverse are the same as each other, only reordered. If we have
received the ciphertext "PDUFXV EUXWXV", and we know that it has been enciphered using the key 3,
then we can use the table to decipher the message. We see that  "P" represents the plaintext letter 
"m",  "D" represents  "a" and so on. Continuing in this way we retrieve the plaintext  "marcus brutus",
the name of the famous conspiritor in the assassination of Julius Caesar.

You might also like