Photo by Anne Nygård on Unsplash

Private vs Public Keys for secure communication

Manpa Barman
3 min readApr 29, 2024

--

explain like I am ten (ELI10) series

There are two friends : Lex and Diana. They lived in a suburb near Dusseldorf, Germany. They loved playing the game of “truth and dare” on every weekend. However, one day suddenly Lex’s parents decide to leave Germany and settle in Norway. Both were very sad, but helpless. To keep there friendship alive they decided to write letters to each other frequently. Diana suggested “Why don’t we play our games via letters? It will be interesting to exchange our tasks via letters”. Both shouted in happiness “Super!! Prost 🍻”.

Photo by saeed karimi on Unsplash

But Diana was concerned that they should be the first one to read the post and not the postman or the post office officials. Lex tried to convince Diana that the envelope will be sealed and it will not be read by anyone else. Also, they will communicate in “Spanish” so that the neighter the German officials nor the Norwegian officials would understand a thing. Diana was not convinced.

So Lex went up to his brother Adam and explained the situation. Adam knew the perfect solution for this.

1. He asked Diana and Adam to select one pair of secret codes each from his magic box, which gives unpredictable and unique pairs every draw. So, Diana had codes (p1, c1) and Lex had codes (p2, c2). But currently both are secret 🤫.

2. Then they were made to disclose their first secret code (p1 and p2), such that everyone can see that Adam, Diana and Lex. But still keep the codes c1 and c2 a secret.

Adam explained “These codes are like your keys : you lock a “message” i.e. your “truth and dare task” with code p1 and p2 and unlock the “message” with code c1 and c2 respectively".

Diana was excited “Its interesting. But how do we do that. I still can’t understand.”

Adam : “Lex you have Diana’s locking code right?”

Lex: Yes, you mean the code p1?

Adam: Exactly! You can write your “message” in German and then lock it with Diana’s public key p1. Send the locked (encrypted) letter.

Lex: Aahh… And then Diana can unlock the message in her end with her private key c1 and read the unlocked (decrypted) letter

Diana: That’s exciting. Then I can write my “message” and lock it with Lex code p2 and Lex on the other end can unlock it with c2.

Adam: Genau!!! But remember DONOT disclose your private unlocking keys to anyone. Don’t even write in a paper and keep it in any public space. It is for unlocking your “truth and dare task” letter, I am sure you don’t want anyone else to get that.

Lex and Diana shouts in joy “Natürlich 🥳”.

They are happy that now they can continue their weekend games, without letting anyone else reading their tasks and greetings!

--

--

Manpa Barman

Life is taking twists and turns. This space is to share my work and experiences so far.