A-Z Popular Blog Security Search »
Information Security
 Advertisements
Related Guides
Confidential Information

Cybersecurity Risk

Public Key vs Private Key

 , updated on
A public key is used to encrypt messages. A public key is published so that anyone can send a particular receiver a secure message.
A private key can be used to decrypt messages encrypted with a matching public key. As the term suggests, private keys are intended to be secret.

Asymmetric Encryption

Asymmetric encryption is a technique that allows anyone to send encrypted messages to a receiver. It is based on cryptographic algorithms for generating matching pairs of public/private keys such that the private key can't be guessed from the public key.
The public key is then published using techniques such as digital certificates. The private key is configured in encryption enabled software and kept secret.

Symmetric Encryption

Symmetric encryption is based solely on private keys. For example, symmetric encryption may be used to encrypt data in storage. It is also used in communications by sharing private keys between endpoints.
In many cases, asymmetric encryption is used to initialize a session and exchange private keys. Then communication is encrypted with symmetric encryption. This is done because symmetric encryption is faster than asymmetric encryption.
Public Key vs Private Key
Public Key
Private Key
Definition
A published key that can be used to send a secure message to a receiver.
A secret key that can be used to decrypt messages encrypted with the corresponding public or private key.
Applies to
Asymmetric Encryption
Asymmetric Encryption
Symmetric Encryption

Authentication Schemes

In order to secure data or messages you encrypt with a public key and decrypt with a private key. The opposite is sometimes done for the reasons of signing a message to prove that you're the source. In other words, encryption with a private key can be used to prove that you hold the private key. This is confirmed by decrypting with the corresponding public key. This technique is used in authentication schemes such as digital signatures. In practice, different private-public key pairs are used for signing messages and securing message communication. The following chart illustrates the various patterns of encryption with public and private keys.
Scenario
Public Key
Private Key
Asymmetric Encryption
Encrypt
Decrypt
Authenticate the origin of a message
Decrypt
Encrypt
Symmetric Encryption
N/A
Encrypt
Decrypt
In practice, all three of these scenarios may be performed on the same message using different keys. For example, data that is encrypted with a private key to prove the origin of a message is often sent inside a message encrypted with a public key.

Encryption

This is the complete list of articles we have written about encryption.
Cleartext
Cryptography
Hashcode
Key Stretching
Keys
Nonce
Pepper
Private Key
Random Seed
Salt
Plaintext
Pseudorandom
Public Key
Public Key Encryption
Strong Password
Symmetric Encryption
More ...
If you enjoyed this page, please consider bookmarking Simplicable.
 

References

Fujisaki, Eiichiro, and Tatsuaki Okamoto. "Secure integration of asymmetric and symmetric encryption schemes." Annual International Cryptology Conference. Springer, Berlin, Heidelberg, 1999.
Rivest, Ronald L., Adi Shamir, and Leonard Adleman. "A method for obtaining digital signatures and public-key cryptosystems." Communications of the ACM 21.2 (1978): 120-126.

Cryptography

A list of cryptography concepts.

Hashcode

An overview of hashcodes.

Pseudorandom vs Random

The difference between a pseudorandom and true random number.

Cryptographic Keys

Definitions of common types of cryptographic key.

Password vs Key

The difference between passwords and keys.

Digital Watermark

A definition of digital watermark with examples.

Network Security

An extensive list of network security techniques.

Security vs Privacy

The relationship between security and privacy.

Hardening

An overview of technology hardening.

Deep Magic

An overview of deep magic, a technology term.

Defense In Depth

An overview of defense In depth.

Encryption Examples

A definition of encryption with examples.

Canary Trap

A definition of canary trap with an example.

Honeypot

A definition of honeypot with examples.

Security Through Obscurity

A definition of security through obscurity with an example.

Tokens

A definition of token with examples.

Backdoor

A definition of backdoor with examples.
The most popular articles on Simplicable in the past day.

New Articles

Recent posts or updates on Simplicable.
Site Map