Cryptography Basics in Under 1 Minute

Passing notes is something that we’ve all done. Pass it to a friend who passes it to your crush who checks yes or no, who passes it back to the friend and so on. Someone probably told you that is was a childish behavior. What a lie! Passing notes has been an important form of communication for millennia. Whether it be messages between lovers, military orders, or simply financial documents there is always a need to keep some things secret and/or tell if something has been tampered with. Today most of that is accomplished with the aid of computers and is studied by a field called cryptography. That is what I’m going to introduce you to.

Example

Picture this. It’s 55 BC in what is now Germany, in the middle of the 1st Gallic war. Julius Caesar sends orders to one of his Legions to reinforce a besieged unit. If his message makes it to it’s intended recipient can mount an effective counter attack. If the message is intercepted then there could be disaster, the enemy will know that one legion is in trouble or they might learn the location of the second legion. There needs to be a way to ensure that if the message falls into the wrong hands it won’t be useful to the enemy.

“Legion XI, travel northwest for thirty kilometers to reinforce the garrison that is currently engaged along the western river bank. Be swift and quiet as you are not known to the enemy”.

Now, before Caesar sent his courier off he needed something to scramble the message. He devised a method to do exactly that and taught his generals to decode it.

This is the procedure to encode the message. The letter X is actually the letter A, the letter E is actually the letter H, and so on throughout the alphabet. This is called a substitution cipher, as each letter is substituted with another according to certain rules. The resulting message looks like this:

“Ibdflk UF, qoxsbi kloqetbpq clo qefoqv hfiljbqbop ql obfkclozb qeb dxoofplk qexq fp zroobkqiv bkdxdba xilkd qeb tbpqbok ofsbo yxkh. Yb ptfcq xka nrfbq xp vlr xob klq hkltk ql qeb bkbjv.”

To anyone who doesn’t know the secret transformation, this just looks like random letters. But by reversing the rules used to generate it the original message can be obtained.

Next steps

Modern cryptography is entirely based on math. We can represent the cipher that we demonstrated above with a few key formulas. We’ll save that for a future article!