Beginner Topic 15 of 51 Security & Cryptography
Asymmetric Encryption
Encryption with paired public and private keys.
How it works
Asymmetric, or public-key, cryptography uses a key pair: a public key that can be shared openly and a private key kept secret. Data encrypted with the public key can be decrypted only with the private key, and signatures made with the private key can be verified with the public key. It solves key distribution, since parties never share a secret in advance, but it is much slower than symmetric encryption and is mostly used to exchange symmetric keys and to sign. Common systems are RSA, elliptic curve cryptography and Diffie-Hellman.
Step-by-step walkthrough
- The receiver publishes a public key.
- The sender encrypts with it.
- Only the receiver's private key can decrypt.
- No shared secret needs to be sent beforehand.
- It is slower, so it is often used to exchange a symmetric key.
Where it is used
TLS handshakes, SSH keys, email encryption with PGP, code signing, cryptocurrency wallets and certificates use it.
Common pitfall
Trusting a public key without verifying whose it is allows man-in-the-middle attacks, which is why certificates exist. Private-key theft compromises everything. Small keys and weak randomness break security, and quantum computers threaten RSA and elliptic curves in the future. Use recommended key sizes and libraries.
Where it fits in the course
Asymmetric Encryption is topic 15 of 51 in Security & Cryptography, rated Beginner. It follows AES. The next topic is RSA.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Security & Cryptography quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Security & Cryptography quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Asymmetric Encryption?
Where do people use Asymmetric Encryption?
What is the most common mistake with Asymmetric Encryption?
What should I learn before this topic?
How can I practice it?
Is Asymmetric Encryption hard to learn?
How long does it take to learn Asymmetric Encryption?
Which topics are related to Asymmetric Encryption?
What should I study after Asymmetric Encryption?
Related topics
- AES (Security & Cryptography)
- RSA (Security & Cryptography)
- Symmetric Encryption (Security & Cryptography)
- Hash Functions (Security & Cryptography)