ELI5: What is encryption, and how does HTTPS keep my data safe?
Encryption is a way of scrambling a message so only someone with the right key can unscramble it.
The lock-box analogy: Imagine you want to send a secret note through the mail. You put it in a box and lock it. Anyone who intercepts the box sees only a locked box.
There are two main styles:
- Symmetric encryption: the same key locks and unlocks. Fast, but you need a safe way to share the key.
- Asymmetric (public-key) encryption: there's a public key anyone can use to lock a box, and a private key only the owner has to unlock it. This solves the key-sharing problem.
What HTTPS does:
- When you visit a site, your browser and the server do a quick "handshake."
- The server proves its identity with a certificate, vouched for by trusted organizations.
- They use public-key tricks to safely agree on a shared secret key.
- Then everything you send and receive is encrypted with that fast symmetric key.
What HTTPS protects: people on the same Wi-Fi or along the network path can't read or alter what you type, like passwords or card numbers.
What it doesn't do: it doesn't guarantee the website itself is honest. A scam site can have HTTPS too.
Did you know the padlock doesn't mean a site is trustworthy? What other security basics should we explain?
Comments · 2
The mailbox analogy is good. The detail worth adding is that the certificate is how your browser knows the site is who it claims to be, which is as important as the scrambling.
The neat bit of public-key cryptography is that you can set up a shared secret over an open channel. It seems impossible until you see the math, and it's a great example of a one-way function.