The **key difference** between Public key and Private Key is that **if the public key is the locking key, then it can be used to send private communication (i.e. to preserve confidentiality) while If the private key is the locking key, then the system can be used to verify documents sent by the holder of the private key (i.e. to preserve authenticity).**

Cryptography is the study of hiding information. It allows protecting information from other third parties when communication occurs over an untrusted medium such as the internet. Encryption uses an algorithm called a cipher to encrypt data and it can be decrypted only using a special key. Ciphertext or ciphertext is the encrypted information. Decryption is the process of obtaining the original information (plaintext) from the ciphertext. There are two encryption methods. They are Public Key Encryption and Symmetric Key Encryption. Public key encryption contains two different but mathematically related keys. They are the public key and private key. The symmetric key encryption uses the same private key for encryption and decryption.

### CONTENTS

1. Overview and Key Difference

2. What is Public Key

3. What is Private Key

4. Side by Side Comparison – Public Key vs Private Key in Tabular Form

5. Summary

## What is Public Key?

In public key encryption, data encrypted using the recipient’s public key cannot be decrypted without using a matching private key. On the other hand, the public key allows decrypting data encrypted by the matching private key.

However, it is not possible to use public key in the place of the private key. If the locking key is public, then anybody can use the system to send private communication to the holder of the unlocking key. This makes sure that the legal recipient or the one who has the matching private key is the only person able to read the message. So, this confirms confidentiality of the communication between two parties.

## What is Private Key?

In public key encryption, the private key allows only to decrypt the data that was encrypted using the matching public key. Similarly, data encrypted using private key can only be decrypted using the matching public key. However, it is not possible to use the private key in the place of the public key. If the locking key is private, this system makes it possible to verify that the owner locked those documents. The reason is that a message encrypted by the sender can only be opened by a person with the matching public key, thus verifying that the sender did actually hold the private key. In other words, it means that the original and non-tampered message has been received. Therefore, digital signatures use this.

## What is the Difference Between Public Key and Private Key?

Public key is a published key that helps to send a secure message to a receiver. If it is the locking key, then it can be used to send private communication.

On the other hand, the private key is a secret key. It helps to decrypt messages encrypted with a matching public key. If the private key is the locking key, then the system can be used to verify documents sent by the holder of the private key.

## Summary – Public Key vs Private Key

Public key and private key is a couple of keys used in public key cryptography. If the locking key is made public, then the unlocking key becomes the private key and vice versa. Public key cannot be used to derive the private key. The difference between Public key and Private Key is that if the public key is the locking key, then it can be used to send private communication (i.e. to preserve confidentiality) while If the private key is the locking key, then the system can be used to verify documents sent by the holder of the private key (i.e. to preserve authenticity).

##### Reference:

1.“Public Key vs Private Key.” *Simplicable*. Available here

##### Image Courtesy:

1.’1091254′ by tumbledore (CC0) via pixabay

yamraaj says

Ghochaakkkk

Gokul says

Well explained. thank you