Find a course

Module 4: The Web, Security and Who Runs ItLesson 9 of 1012 min

HTTPS and Encryption

Learn how HTTPS and TLS encrypt your connection, how certificates prove a site's identity, and what the padlock does and does not tell you.

Step 1 of 12Learn

Postcards on public Wi-Fi

Imagine sending a postcard. Every mail carrier who handles it can read it. That's what unencrypted HTTP traffic is like: any device along the path, such as a public Wi-Fi hotspot, a compromised router, or anyone sharing an open network, could read or even change the data as it passes.

On an open café network, someone with free tools could watch unencrypted traffic and see which pages you load, what you type into forms, and sometimes the cookies that keep you logged in.

HTTPS solves this. It's HTTP sent through an encrypted channel created by TLS (Transport Layer Security), the successor to an older protocol called SSL. With HTTPS:

  • Confidentiality: eavesdroppers see scrambled data, not your messages or passwords.
  • Integrity: if anyone tampers with data in transit, the change is detected.
  • Authentication: your browser checks that it's really talking to the site named in the address bar, not an imposter.

A decade ago, many sites used HTTPS only for login and payment pages. Today the vast majority of web traffic is encrypted, thanks partly to free certificate services and browsers labeling plain HTTP pages as "Not secure."

Step 2 of 12Compare

What someone on the same Wi-Fi can see

AspectHTTPHTTPS
Which site you visitYesUsually yes (the domain name)
Which pages you openYesNo
Passwords and form dataYes, in plain textNo, encrypted
Can they change the page?YesNo, tampering is detected

Step 3 of 12Practice · Select all that apply

What does HTTPS provide? Select all that apply.

Select all that apply.

Step 4 of 12Learn

Keys and locks: how encryption works

Encryption scrambles data using a mathematical recipe and a secret value called a key. Without the right key, the scrambled data is useless.

There are two main kinds:

  • Symmetric encryption uses the same key to scramble and unscramble data. It's very fast, but there's a problem: how do two strangers on the internet agree on a secret key without an eavesdropper seeing it?
  • Asymmetric (public-key) encryption uses a pair of keys. The public key can be shared with anyone; the private key stays secret. Data locked with the public key can only be opened with the matching private key. Picture an open padlock you hand out freely: anyone can snap it shut on a box, but only you have the key that opens it.

TLS combines both. During the TLS handshake, the browser and server use public-key methods to agree on a fresh shared secret without ever sending it in readable form. Then they switch to fast symmetric encryption for the rest of the session.

The math behind this relies on problems that are easy to compute one way but practically impossible to reverse without the key, like multiplying two huge prime numbers versus figuring out which primes were multiplied. Researchers are already rolling out new "post-quantum" methods designed to resist future quantum computers.

Step 5 of 12Practice · Match the pairs

Match each concept to its description.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Symmetric encryption
  2. Public key
  3. Private key
  4. TLS handshake

Step 6 of 12Practice · Diagram

TLS handshake, simplified

At which step would the airport Wi-Fi impostor be caught?

Tap the shape that answers the question, then press Check.

TLS handshake, simplifiedProcess diagram: Browser says hello → Server sends certificate → Browser checks it → Agree on a session key → Fast symmetric encryption.Browser says helloServer sendscertificateBrowser checks itAgree on a sessionkeyFast symmetricencryption
Browser says hello

Lists the encryption methods it supports.

Server sends certificate

Contains its public key and the CA's signature.

Browser checks it

Is it signed by a trusted CA, unexpired, and for this exact domain?

Agree on a session key

Public-key (asymmetric) math lets both sides agree a secret without sending it.

Fast symmetric encryption

Everything after uses the shared session key.

Step 7 of 12Learn

Certificates and the padlock

How does your browser know it's talking to the real bank.example and not an attacker pretending to be it? Through certificates.

A TLS certificate is a digital document that says, in effect, "this public key belongs to bank.example." It's digitally signed by a certificate authority (CA), an organization that browsers and operating systems trust. Before signing, the CA checks that the requester actually controls the domain. Your browser comes with a built-in list of trusted CAs and checks the signature, the domain name and the expiration date every time you connect.

If something's wrong, such as an expired certificate, a mismatched name or an untrusted signer, the browser shows a full-page warning. Take those warnings seriously, especially on public Wi-Fi.

Now the most misunderstood icon on the web: the padlock (newer browsers show a simpler settings icon instead). It means the connection is encrypted and the certificate is valid for that domain. It does not mean:

  • the site is legitimate or safe,
  • the company is who you think it is,
  • the content is true.

Phishing sites routinely use HTTPS, because free certificates take minutes to get. paypa1-secure-login.com can have a perfectly valid certificate. Always check the domain itself.

Step 8 of 12Practice · Diagram

The chain of trust

Which certificate does your device already trust before visiting the site?

Tap the shape that answers the question, then press Check.

The chain of trustHierarchy diagram: Root CA certificate, Intermediate CA, bank.example certificate.Root CA certificateIntermediate CAbank.examplecertificate
Root CA certificate

Pre-installed in your operating system or browser's trust store.

Intermediate CA

Signed by the root; does the day-to-day signing.

bank.example certificate

Signed by the intermediate; sent by the website.

Step 9 of 12Practice · True or false

A padlock icon in the address bar means the website is legitimate and safe to give your password to.

Step 10 of 12Practice · What would you do?

What would you do?

At an airport, Ana connects to free Wi-Fi called "Airport_Free_WiFi." She opens her email and gets a full-page browser warning: "Your connection is not private. The certificate is not valid for this site."

Step 11 of 12Note

Step 12 of 12Practice · Choose one

What does a certificate authority do?