1. Introduction to Caesar Ciphers
The first well known cipher was a substitution cipher. It was first used around 58 BC by Emperor Julius Caesar. He shifted each letter in his military commands in order to make them seem like gibberish, should they ever be intercepted.
2. Encryption & Decryption Process
Say these two people Bob and Carla need to send and receive an encrypted message. They must each first agree on the variable key, which will be used as the shift in the message. Say the key is 2, so every letter will be shifted 2 down the alphabet (a->c, b->d, c->e, etc.)
Original: ‘I am hungry’
Encrypted: ‘K co jwpita’
Note that the last letter ‘y’ shifted down 2 units will wrap around the alphabet and give a result of ‘a’ (since we go y->z->a)
Now the encrypted message is essentially gibberish. Only smart people can understand (are you smart?)
And to decrypt this, we can just reverse the shift, so after Carla receives this encrypted message from Bob she can shift each letter back by 2 to get the original message that Bob sent. Very simple.
Something to note is that the key is definitely not always 2. So if you intercepted Bob’s message and didn’t know what the key was, you’d have to do some trial and error with different values of the key to decode it. By that time, Bob will have eaten you up.
3. Strengths & Weaknesses
Surprisingly, no one actually cracked the code in Caesar’s time, and it wasn’t until 800 years later than an Arab mathematician by the name of Al-Kindi broke the code by scanning letter frequencies in the language. He was the first to figure out the shift method used in the cipher. After this, the method was widely known and the cover of the famed Caesar cipher was blown.
Today, nobody actually uses this cipher to encode messages. It is way too easy to crack, especially with powerful computers like we have today. But the cipher is probably the most important starting point in understanding Cryptography, and it would definitely make sense to start with this.
4. Encryption practice
Try to encrypt these messages with the Caesar Cipher based on the given key!
Message: 'Hi I'm Bob'
Key: 13
This is known as the rot13 cipher (where the key = 13), a special case of the Caesar Cipher. It is commonly used in Cybersecurity.
Message: 'Pingu bald aaaa'
Key: 79
When key is greater than 26, just take mod 26 to figure out a more simplified version of the key
5. Decryption practice
Attempt to decrypt these messages that were encoded with the Caesar Cipher. This may be a challenge, but looking for letter frequencies may do the trick.
Encoded Message: 'Lhfxmbfxl B ebdx mh ietr obwxh ztfxl unm hmaxk mbfxl B ebdx mh xtm max utgtgtl ebdx max fhgdx whxl'