Skip to content

BeginnerLesson 11 of 11

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 ​

Try itFollow the journey of one page
Your homeYour laptop192.168.1.20Home router192.168.1.1Your providerDNS resolver198.51.100.53The internetcircuit.tako.id203.0.113.80

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.

CheckWhy does the laptop send its DNS question to the home router, and not straight to the resolver?

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:

  1. 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.
  2. 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.

CheckYou log in to a site over HTTPS through a café’s Wi-Fi. What can the café’s router see?

The ideas of this level ​

LessonWhere it was in the journey
1. What is a network?The whole drawing: your home, your provider, and the internet.
2. Cables, light, and radioEvery link the messages crossed.
3. Messages in piecesThe page coming back.
4. AddressesThe frame to the home router, and the IP address of the server.
5. Counting like a computerEvery address on every card.
6. Reading an IP addressNear or far.
7. SwitchesInside the home, in the switch built into the home router.
8. Routers and the gatewayEvery hop out and back.
9. DNSThe first question.
10. Ports and protocolsDNS on port 53 over UDP, and the web on port 443 over TCP.
Try itPut the steps in order
  1. Three messages open a TCP conversation with port 443.
  2. The laptop asks the resolver for the address of circuit.tako.id.
  3. The browser draws the page.
  4. The laptop already has an address, a gateway, and a DNS resolver.
  5. The laptop and the server agree on a secret key, and the server proves its name.
  6. The answer comes back: 203.0.113.80.
  7. The page arrives in packets, and TCP puts them in order.
  8. The laptop sees 203.0.113.80 is not on its network, and sends to the gateway.
  9. The browser asks for the page.

Discussion

Stuck, or found a mistake? Ask here. You sign in with GitHub.

Released under the Business Source License 1.1.