Locks and Keys

Hemanth Chitti
The Fun Of Cryptography
3 min readMar 6, 2020

The concept of a key is so fundamental that I’ve made it the publication avatar for this blog. Let’s look into it a little more.

We discussed here ( https://medium.com/the-fun-of-cryptography/security-goals-1fd972ada78e) how one of the goals of security is confidentiality. So we’ve got to make sure the message can only be read by, continuing the previous example, Alice and Bob but invisible to everyone else. How would we do that?

Well, we could hide the communication channel itself. Continuing the previous example, you are the medium between Alice and Bob. So what Alice does is make sure that nobody knows you are carrying the message. Maybe she just keeps it a secret, maybe she uses another friend as decoy to throw suspicion off of you. But finally, until the message is delivered nobody knows that you are carrying it.

We could also choose to hide only the message we use and not the person. So maybe she decides that since it’s public knowledge that only you would be trusted enough by both Bob and her to carry such a message, she decides to disguise the message in some way which should be unknown to eavesdroppers like Eve. This is in fact much better than the previous method, both in terms of logistics (hiding an entire channel isn’t easy!) and in terms of security (Eve would’ve guessed that you were the channel as there were fewer choices to try — now there are multiple ways to encrypt a message).

I guess you get the gist of what I’m trying to say here though. There has to be something hidden from others in order to secure your message so that it remains inaccessible to a third party. However whatever it is, it should be known to the receiver -otherwise even he can’t understand it and all that work you put into hiding your message is wasted.

You could think of your message as a locked room with 2 keys.

Lock and key
Lock and key

Alice and Bob would have the 2 keys and thus they can ‘open the room’ and read the message, while Eve doesn’t have it and can’t do so.

This idea of there being a key is common sense but is fundamental to the study of cryptography, simply because for every lock, there’s always a robber who breaks it open, whether it be by making a master key or by simply hammering it. And thus what we will be doing in further study is studying how to secure our keys and locks better.

Note : The definition of key here is different from the standard notion of key. Here key means anything that should be hidden. If you want to hide the algorithm itself then that comes under a key too, knowledge of which is required to read the message. But as we see in our next post on Kerchkoff’s principle, you need to know how much to keep hidden. It’s there that our definition of key will reduce to the one used in standard cryptography textbooks.

--

--