Let's talk about encryption

The better to write you with

Let’s say you are Red Riding Hood, and you want to write a letter to your grandmother telling her you will be visiting. However, the big bad wolf is aware of your plans, and he decides he will also write a letter to your grandmother (pretending to be you) saying you won’t be visiting. If only there was a way you could let your grandmother know your letter was from you and the wolf’s letter was a fake. What if I tell you, little Red Riding Hood, that there is a way you can do this!

Now you’re just some terms that I used to know

Too complex so let’s be a little imaginary

I need you, dear reader, to assume a few things here.

Firstly, asymmetric key encryption may sound like magic, and it is tough to give really simple examples to show how it works. So, for now, we’ll just assume such algorithms exist. Secondly, it is also important to note here that it is assumed that an encrypted message cannot be easily decrypted without the decryption key. This is also true in practice, but reasons why it holds true are too complex for this post.

Uses

Now that we know about asymmetric key encryption, how can we use it to help solve Red Riding Hood’s conundrum?

–Feel free to take a break here and think about solutions to this if you wish–

Well, anytime you (or Red Riding Hood) want to say you yourself wrote a message, you can encrypt the message with your private key and add it as a “signature” (technical term, used to refer to the encrypted message) to the message. Your recipient (Grandma) knows your public key and should be able to decrypt your signature to see that it matches the original message. The big, bad wolf will not be able to sign the message (as he does not know your private key) with the same signature. Grandma will immediately know it is a fake when she is unable to decrypt the wolf’s false signature with your public key!

End

Relieved to have solved the problem, you get back to writing your letter. Little do you know, that further dangers remain…

Tune in next week for part 2!