Alt Text!
Geschreven door Alex Verstappen op donderdag, 12 december 2019

Crypto 101: The Caesar Cipher

What is cryptography?

Imagine two persons that have an important secret to share with each other. This requires them to communicate in a private manner. However, there is an eavesdropper nearby that also want that information and tries to intercept the secret. So the two people decide to communicate the information in some secret code. They will send their secret information with a lock on it where only they know the combination. Putting the lock on the message is known as encryption. They can see the shared secret by opening the message with the code they shared in advance. Opening this message by removing the lock is called decryption. Cryptography starts where you use virtual locks instead of physical locks. These virtual locks are called ciphers. Using these Ciphers a message becomes unreadable for an eavesdropper unless the eavesdropper finds a way to create the secret code used to encrypt or decrypt the message.

The first known evidence of cryptography goes back 4000 years, where Egyptians communicated in hieroglyph. Cryptography has been a deciding factor in many important historic events, for example during World War II with the enigma machine.

Caesar Cipher

One of the first known Ciphers is the Ceasar Cipher. The Cipher is based on shifting each letter in the message in order to make the message unreadable. Caesar used this Cipher in his military messages, so enemies were not able to see Caesar's plans. You can decide how many letters the shift will be and the message will seem to be unreadable. 

For the next example, we will use a shift of four letters. A becomes E, B becomes F, C becomes G, etc. The unencrypted message: ‘Bright Cubes Crypto Blog’ will become the encrypted message ‘Fvmklx Gyfiw Gvctxs Fpsk’. To decrypt this message you can just subtract the shift of four letters.

You can try the Ceasar Cipher yourself:

However, the Caesar Cipher is not very strong and has a great weakness. You can use the language a message is written to break the Cipher. The letter frequency count of a language can be seen as a fingerprint. Some letters are more frequently used than others. 
If you compare the frequently used letters in the encrypted text to the frequently used letters in the fingerprint you can find how far the letter is shifted. This is called frequency analysis. The longer the message the easier it is to find the shift. You have more valuable information to compare with.

The Caesar Cipher is also a lot of fun for kids to make a secret way of messaging, because it is an easy way to encrypt/decrypt messages. 

More Crypto 101 will follow in the next blogs.

Plaats een reactie:

Ben jij een IT-professional die zich breder wil ontwikkelen?
Neem dan contact met ons op!
Telefoon: 088-81 81 100

Deel dit Blog artikel