Opening a website
You type circuit.tako.id, press Enter, and a moment later the page is there. In that moment, your laptop uses every idea of this level, and one new one: the lock.
The journey
The laptop’s settings
- Address
- 192.168.1.20/24
- Gateway
- 192.168.1.1
- DNS resolver
- 198.51.100.53
Step 1 of 10
What the laptop already knows
Your laptop joined the home network earlier. It was given its own address, the size of its network, a gateway, and a DNS resolver to ask.
The lock
Your packets pass through many routers that belong to other people: your provider, the networks in between, and perhaps the Wi-Fi of a café. Each of them must read the addresses on a packet to pass it on. Without a lock, they could also read everything inside: the page, what you type into it, and your password.
HTTPS is web pages sent over a locked conversation. The lock does two things:
- A secret key. The browser and the server agree on a key, a long secret number that only the two of them know. They use mathematics that lets two sides agree on a secret in the open. Someone who sees every message between them still cannot work out the key. From then on, everything they send is scrambled with that key, and only the other side can unscramble it.
- Proof of the name. A key is no use if you share it with the wrong server. So the server shows a A signed statement, from an organization your browser trusts, that a key belongs to a name such as circuit.tako.id.. It is a statement, signed by an organization your browser trusts, that this key belongs to
circuit.tako.id. If the name does not match, or the signature is wrong, the browser warns you instead of showing the page.
The lock beside the address in your browser means both happened. It does not mean the site is honest. It means only that you are talking to whoever owns that name, and nobody on the way can read what you say.
What the lock does not hide
The routers on the way still see the addresses and ports on every packet, because they need them to pass it on. Often they can see the name of the site you asked for too. Only what is inside is locked: the page, and everything you send to it.
The ideas of this level
| Lesson | Where it was in the journey |
|---|---|
| 1. What is a network? | The whole drawing: your home, your provider, and the internet. |
| 2. Cables, light, and radio | Every link the messages crossed. |
| 3. Messages in pieces | The page coming back. |
| 4. Addresses | The frame to the home router, and the IP address of the server. |
| 5. Counting like a computer | Every address on every card. |
| 6. Reading an IP address | Near or far. |
| 7. Switches | Inside the home, in the switch built into the home router. |
| 8. Routers and the gateway | Every hop out and back. |
| 9. DNS | The first question. |
| 10. Ports and protocols | DNS on port 53 over UDP, and the web on port 443 over TCP. |
- Three messages open a TCP conversation with port 443.
- The laptop asks the resolver for the address of circuit.tako.id.
- The browser draws the page.
- The laptop already has an address, a gateway, and a DNS resolver.
- The laptop and the server agree on a secret key, and the server proves its name.
- The answer comes back: 203.0.113.80.
- The page arrives in packets, and TCP puts them in order.
- The laptop sees 203.0.113.80 is not on its network, and sends to the gateway.
- The browser asks for the page.