A secret code with a key
Day 17 of 149
π Full deep-dive with code examples
The Secret Code
When you were a kid, you might have created a secret code with friends:
A β 1
B β 2
C β 3
...
"HELLO" becomes "8 5 12 12 15"
Friends who know the code can read it!
Encryption is the real-world version of this idea: you transform readable text into something unreadable without a key.
One important difference: modern encryption is not a simple Aβ1 mapping β it uses well-studied algorithms plus a secret key.
How It Works
You have a message you want to keep private.
Encrypt with a special key:
"Meet me at 5"
β (secret key)
"xK9#mL@pQr!5vB2n..."
Without the key, it should be impractical to recover the original message.
Decrypt with the same key:
"xK9#mL@pQr!5vB2n..."
β (same secret key)
"Meet me at 5"
Someone with the key can read it.
Types of Encryption
Symmetric: Same key to lock and unlock
- Like a house key
- Fast, simple
- Problem: How do you share the key secretly?
Asymmetric: Two different keys (public + private)
- Public key: Anyone can use to LOCK
- Private key: The key-holder can UNLOCK
- Like a mailbox: anyone can drop mail, and the key-holder can open it
Where You See It
- π HTTPS (encrypts data in transit between your browser and the site)
- π± WhatsApp (uses end-to-end encryption for messages; some backups and features can change whatβs protected)
- π³ Online payments
- π Password managers (encrypted vaults)
Note: the lock icon mainly means the connection is encrypted and the site proved control of its domain via a certificate β it doesnβt tell you whether the site is trustworthy.
Note: Password storage is usually done with hashing (not encryption).
In One Sentence
Encryption scrambles your data so someone with the right key can unscramble and read it.
π Enjoying these? Follow for daily ELI5 explanations!
Making complex tech concepts simple, one day at a time.
Top comments (0)