Rajesh kanna
4 min readApr 25, 2022

--

SYMMETRIC AND ASYMMETRIC CRYPTOGRAPHY: AN EXPLAINER

Cryptography is something that we benefit from it in our daily lives but most of us are unaware of it. As more and more data is being stored and transacted digitally and as more and more physical things are represented digitally (eg., digital cash, property certificate, documents, etc.), they must be safely stored and transacted. That’s where cryptography kicks in.

Image from Pexels.com

Cryptographic algorithms are used to secure digital data. For eg., when you send a message to your friend through Whatsapp, your text is converted into random letters and numbers. Your converted text is called Ciphertext. This process is called encryption. It is done to securely transfer your text over the internet because hackers are waiting on the backdoor of the internet to access your message. Once your text reaches your friend, your text is converted back into normal text. This process is called Decryption.

From the short example above, we can say that Cryptography is the art of encrypting and decrypting data through some predetermined instructions (Algorithms). Cryptography is classified into two major aspects such as symmetric cryptography and asymmetric cryptography.

Let’s look into them through my own interpretation….!

SYMMETRIC CRYPTOGRAPHY

Symmetric cryptography is the process of encrypting and decrypting where the same key is used for both encrypting and decrypting and hence the name symmetric.

Image from Google

Let’s understand it through an example. You’re trying to send a “Let us meet at the park today.” message to your friend through a letter. But you’re worried that someone will read the message when your letter is on the way to your friend or something. So, you’re deciding to encode your message. You’re assuming that the letter “A” implies 1, “B” implies 2, and so on. Now, you’re encoding your message with a number that directly implies the letter. But, you still feel that a third person might guess the way in which you encrypted your message. So, you’re deciding to shift the number from directly implying number (A-1) to another number (A-5). Now, your encryption is much strong as a third person will not be able to access your message at least for a time being.

This is how symmetric encryption works.

Your message: “Let us meet at the park today.”

Shift Number (Key): 5

Encrypted Message: “Qjy zx rjjy fy ymj ufwp ytifd.”

During ancient times, this method was used by many kings so that enemies can’t access the message. The most popular symmetric cryptography is Caesar Cipher which is used by king Caesar to encrypt the message.

ASYMMETRIC CRYPTOGRAPHY

Symmetric cryptography has a major limitation with respect to the digital world. Because in order to decrypt the message encrypted by the sender, the receiver must know the decryption key to read the message. But, it is not secure to share the key over the internet. And that’s where asymmetric cryptography kicks in.

In asymmetric cryptography, we don’t generate a single (private) key. Rather, we generate a key pair that includes a public key and a private key. Also, the key pair is generated by both the sender and the receiver separately. The public key can be shared over the internet whereas the private key must not be shared with anyone. The following picture brilliantly shows how asymmetric encryption works.

Image from Google

Let’s break down the above figure to understand how it works intuitively. Let’s assume that the left row is Alice and the right is Bob.

Firstly, either Alice or Bob generates a Public key (Red colour) and shares it with the other party.

Then both have a private key (Secret colour) which they don’t share with each other.

Then both Alice and Bob combine their respective private keys with the public key and share their respective combinations with each other (Alice shares his combination of the public key and his private key i.e., Yellow colour, and Bob shares his combination of the public key and his private key i.e., Pink colour ).

Finally, when each party combines his private key with the other party’s combination, they share the common secret key.

Through the secret key, they can encrypt and decrypt the messages and that has become possible without sharing the secret key over the internet. Thanks to those magical (in fact it’s not magic) colour combinations. This can be made possible mathematically through modular arithmetic. I’m not including the mathematical proof for simplicity purposes.

I hope I have given my justification for the title of this article. If you like cryptography or if you don’t, play around with them because Math is FUN!

--

--