What is asymmetric encryption?
In cryptography, there are asymmetric encryption and symmetric encryption. And today we are going to talk about asymmetric encryption also known as public key cryptography.
So what is asymmetric encryption? And why it’s important.
In today post, you’ll learn:
- What is asymmetric encryption?
- How does Asymmetric Encryption work?
So if you’re ready to go all in with asymmetric Encryption, this post is for you.
Let’s dive right in.
Let's assume, that you want to send an encrypted message to your friend. but he lives outside your country, and you can’t meet him to agree on a shared secret key. for this reason you can't send him encrypted messages.
So what will you do? And what is the solution for this problem.
you can use asymmetric encryption to solve this problem, because it will allow you to exchange shared secret key with your friend without meeting him.
What is asymmetric encryption?
In symmetric encryption we use the same key to encrypt and decrypt messages. And in asymmetric encryption we use two keys: one is used for encryption and the other for decryption.
The first key is the public key, and we use it for encryption.
The second key is the private key, and we use it for decryption.
Asymmetric encryption also known as public key cryptography.
How does Asymmetric Encryption work?
Let’s assume that, you want to send an encrypted message to your friend.
What you will do?
First you will need to get his public key because you will need it to encrypt your message. When you encrypt your message. You will send it to your friend.
When your friend get your encrypted message. He will use his private key to decrypt it.
Let's take a real example:
You want to tell your friend that you want to meet him tonight at 20:00. you will send him an encrypted message.
So what are the steps that you will need to take to send an encrypted message to your friend?
Step one:
You will get his public key.
Step two:
You will use your friend public key to encrypt your message.
Step three:
You will send the encrypted message to your friend.
When he gets your encrypted message. He will use his private key to decrypt it.
So if you want to send encrypted messages to anyone. the first step is to get his public key, and then you will encrypt it, and then you will send it.