If you are learning cybersecurity or just network security part of it, you will definitely see encryption and decryption. In this blog post, we are going to see what public key encryption is and how it works.

Public key encryption is a type of encryption process in which encrypted communication uses a pair of keys. We call these keys as a public key and a private key.

## Public and private keys:

A user can distribute his public key with others who want to begin an encrypted communication. A private key is a key which users must not share and must be kept in secret with the user.

### How encrypted communication is carried out in Public Key Encryption

Each user who wants to use public key encryption has to create a pair of keys called a public key and a private key. Generally, one key is used at the time of encryption and other at the of decryption.

If we encrypt the text by a private key then we can decrypt it with the public key and if we encrypt it with the public key then we can decrypt it with the private key. Which makes public key encryption convenient to use in making digital signatures.

Suppose if Lyla wants to send an encrypted message to Shubham then she would need to encrypt the message using Shubham’s public key.

Then Shubham will be able to decrypt the message using his private key.

As the private key is secret only he will be able to able to decrypt and read the message.

But at the same time, Shubham will also need to make sure that the encrypted message is sent by Lyla.

That is where we make use of the Digital Signatures. Lyla can make a Digital Signature using her private key and send it via the original encrypted message.

Then Shubham can verify the Digital Signature using Lyla’s public key. As no one else knows Lyla’s private key, Shubham can make sure that the message has been sent by Lyla.

Thus, This is what public key encryption is and is used for encryption, decryption and Digital Signatures.

Also read: What is AMOLED Display