Expressvpn Glossary
Public key encryption
What is public key encryption?
Public key encryption (asymmetric encryption) is a cryptographic method that uses a pair of mathematically related keys: a public key that can be shared widely and a private key that is kept secret.
Its core purpose is to enable confidential communication without requiring the sender and recipient to share a secret key in advance: data encrypted with the recipient’s public key can be decrypted only with the recipient’s corresponding private key.
How public key encryption works
Public key encryption works through a series of processes that manage, protect, and verify data:
- Key generation: A cryptographic algorithm generates a key pair using predefined parameters (e.g., key size and algorithm type). The private key is only available to its owner, while the public key is intended to be shared. The keys are typically generated before secure data transfers begin (during system or account setup).
- Encryption: A sender obtains the recipient’s public key and uses it to convert plaintext into ciphertext. The result is unintelligible without the corresponding private key.
- Transmission or storage: The ciphertext can be sent across untrusted networks or stored in untrusted locations. Confidentiality is preserved as long as the private key remains uncompromised.
- Decryption: The recipient applies the private key to decrypt the ciphertext back into plaintext.

Common public key encryption algorithms
Some of the most widely used public key algorithms include:
- Rivest‑Shamir‑Adleman (RSA): Based on the difficulty of factoring large integers. Commonly used for key establishment and digital signatures (and historically for encryption/key transport).
- Elliptic Curve Cryptography (ECC): A family of public key methods based on elliptic-curve discrete logarithm problems. Provides comparable security with shorter keys and is widely used in Secure Sockets Layer (SSL) / Transport Layer Security (TLS), as well as in some cryptocurrency systems.
- Diffie-Hellman (DH): A key exchange method that allows two parties to establish a shared secret over a public channel. Often used to derive session keys.
- ElGamal encryption: A public key encryption scheme based on discrete logarithms and related to DH. Randomized (probabilistic) encryption means the same plaintext encrypts to different ciphertexts each time.
Public key encryption benefits and limitations
The main benefit of public key encryption is secure communication without requiring a shared secret key in advance. Key tradeoffs include higher computational cost and added operational complexity.
| Benefits | Limitations | ||
| Allows secure communication over untrusted networks | Slower than symmetric encryption, making it inefficient for bulk data encryption | ||
| Enables encrypted web browsing through HTTPS/TLS | Requires strong key management to protect private keys and manage public key distribution | ||
| Reduces reliance on pre-shared secret keys for initiating secure communications | Compromised private keys can enable impersonation and may expose encrypted data in some systems (modern TLS commonly uses forward secrecy to limit exposure of past sessions) | ||
| Scales better than pairwise pre-shared keys for large systems (often used with hybrid designs) | Often relies on Certificate Authorities to validate identities and protect key distribution |
Common use cases
- Email encryption: Protects email content and supports sender authentication through digital signatures. Commonly implemented using Pretty Good Privacy (PGP) and Secure/Multipurpose Internet Mail Extensions (S/MIME).
- Secure messaging apps: Support secure session setup for end-to-end encrypted messaging.
- Digital signatures and blockchain transactions: Verify the signer (authenticity) and preserve data integrity for signed records and transactions.
- Virtual private network (VPN) authentication and key exchange: Authenticates endpoints and establishes session keys for encrypted tunnels.
Public vs. symmetric key encryption
Symmetric encryption uses the same shared secret key for both encryption and decryption. Each method suits specific purposes. Asymmetric (public key) cryptography is commonly used for secure key establishment and authentication, while symmetric encryption is faster for bulk data. Modern systems typically combine both methods for efficiency.
Further reading
- What is data encryption?
- End-to-end encryption: What it is and why it matters
- Encryption protocols explained: What they are and how they work
- The history of encryption: From ancient codes to digital security