โ๏ธ Symmetric vs Asymmetric Encryption
When to Use Each Typeโ
In 5 minutes: Understand when to use shared secrets vs public/private keys
Prerequisite: Public/Private Keys + Diffie-Hellman
๐ฏ The Simple Storyโ
Alice and Bob need to talk privately.
Question: Should they use the same key (symmetric) or different keys (asymmetric)?
Answer: Use both! Different purposes!
๐ง Mental Modelโ
Hold this picture in your head:
Symmetric (Same Key):
Alice and Bob both have key K ๐
Alice encrypts with K โ Bob decrypts with K
Bob encrypts with K โ Alice decrypts with K
Problem: How to share K initially?
Asymmetric (Different Keys):
Alice has public key pk_Bob (Bob's public)
Bob has private key sk_Bob (Bob's secret)
Alice encrypts with pk_Bob โ Bob decrypts with sk_Bob
Advantage: No secret key exchange needed!
Think of it like:
๐ Shared house key (Symmetric: both have same key, but how to give one the key?)
๐ฌ Mailbox (Asymmetric: different keys for send and receive)