The shape of the lesson
By the end of the lesson, learners can
- What SSL/TLS is for: In the lab, follow a URL to a web server.
- The handshake: TLS is made of two main layers: the handshake protocol, which sets up the secure session, and the record protocol, which then carries the application data in encrypted records.
- When to use it: SSL/TLS is appropriate wherever data travelling over a network is confidential, or where the user must be sure who they are talking to.
- Purpose: encryption, authentication of the server, integrity of data in transit.
- Handshake: client hello, server sends certificate (public key), client checks it.
- Session key: exchanged using the server’s public key; only its private key can recover it.
- Data: then encrypted symmetrically with the session key, because symmetric is faster.
One picture every idea returns to
SSL (Secure Socket Layer) and its successor TLS (Transport Layer Security) are protocols that provide a secure connection between two computers, normally a client and a server. Their purpose is to give encryption (data cannot be understood if intercepted), authentication (the server proves who it is with a digital certificate) and data integrity (any change in transit is detected). A handshake uses asymmetric encryption to agree a session key; the data is then encrypted with that symmetric key. HTTPS is HTTP running over SSL/TLS.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, The padlock, explained.. Every time a browser shows a padlock, SSL/TLS is at work between the client and the server. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: What SSL/TLS is for | In the lab, follow a URL to a web server. Project tab 1 of the lab (HTTP or HTTPS: from URL to web page) and let a student drive it while the class predicts. | Whole class, then pairs |
| 13 to 21 min | Teach and check: The handshake | TLS is made of two main layers: the handshake protocol, which sets up the secure session, and the record protocol, which then carries the application data in encrypted records. Model the worked example Why two kinds of encryption? on the board, one line at a time. Your turn: During a handshake, a browser finds that the server’s certificate was issued for a different domain name. What should happen, and why? | Pairs |
| 21 to 30 min | Teach and check: When to use it | SSL/TLS is appropriate wherever data travelling over a network is confidential, or where the user must be sure who they are talking to. | Anticipation / Reaction Guide |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 19 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in When to use it, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Anticipation / Reaction Guide
Before the lesson, students mark five statements true or false. After the teaching they mark them again and justify any change of mind in one sentence each. The statements come from the examiner traps below.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| HTTPS is not a different protocol from HTTP that "is encrypted". | It is ordinary HTTP carried inside an SSL/TLS connection; say SSL/TLS provides the encryption and authentication. |
| The session key is not the server’s private key. | The private key never leaves the server; a new session key is created for each session. |
| Name a situation and the reason: "online banking, because account details sent across the internet must not be readable if intercepted" earns more than "banking" on its own. | Return to When to use it: ask a pair to state the correct version and show it on the lab before moving on. |
SSL and TLS: worksheet
6 questions, 19 marks. Written in the style of the papers; no past paper question is reproduced.
State three purposes of Transport Layer Security (TLS).
A user types the address of their bank’s website, which uses HTTPS. Describe how SSL/TLS sets up a secure connection between the browser and the web server.
Explain why SSL/TLS uses a symmetric session key to encrypt the data rather than continuing to use asymmetric encryption.
Identify two situations where the use of SSL/TLS is appropriate. For each, explain why.
A student says: "If a website uses HTTPS, it must be safe to enter my card details." Discuss this claim.
State the difference between SSL and TLS, and explain where SSL/TLS operates in the TCP/IP protocol stack.
Answer key and marking notes
- To encrypt data sent between client and server so it cannot be understood if intercepted.
- To authenticate the server (and optionally the client) using a digital certificate.
- To ensure data integrity: data altered in transit is detected.
- The browser requests a secure connection and sends the TLS versions / cipher suites it supports.
- The server replies with its chosen cipher suite and its digital certificate (containing its public key).
- The browser checks the certificate is valid / issued by a trusted CA / in date / for this domain.
- The browser generates session key material, encrypts it with the server’s public key and sends it.
- The server decrypts it with its private key; both now use the shared symmetric session key to encrypt all data.
- Symmetric encryption is much faster / needs less processing than asymmetric encryption.
- A session involves a large amount of data; asymmetric encryption is used only to exchange the key securely.
- Online banking / payments: account and card details must not be readable if intercepted.
- Logging in to a website: the password (and session cookie) must be protected from packet sniffing.
- Accept also: email between client and server, online forms with personal data, VoIP / instant messaging, VPNs, cloud file transfer.
- One mark for each situation, one for each matching reason.
- HTTPS means the data is encrypted between the browser and that server, so it cannot be read in transit.
- The certificate only proves the site controls that domain name; criminals can obtain certificates for their own look-alike domains.
- The user should still check the domain name is correct and the business is genuine; HTTPS does not make the site itself trustworthy.
- TLS is the successor to SSL; SSL is older and its versions are now insecure / deprecated.
- It operates between the application layer (e.g. HTTP) and the transport layer (TCP).
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
Which list gives the purposes of SSL/TLS?
- AEncryption of data in transit, authentication of the server, and integrity of the data
- BRouting of packets, error correction and allocation of IP addresses
- CCompression of web pages, caching of images and faster page loading
- DBlocking malware downloads, filtering spam and scanning attachments for viruses
Put these simplified TLS handshake steps in order.
1 Client checks the certificate
2 Server sends its chosen cipher suite and its digital certificate
3 Both sides encrypt data with the shared session key
4 Client requests a secure connection and lists the cipher suites it supports
5 Client sends session key material encrypted with the server’s public key
- A4, 2, 1, 5, 3
- B4, 1, 2, 5, 3
- C2, 4, 1, 3, 5
- D4, 2, 5, 1, 3
Why does TLS switch to a symmetric session key once the handshake is complete?
- ASymmetric encryption is much faster, which suits the large amount of data in a session
- BSymmetric keys do not need to be kept secret once the connection is open
- CAsymmetric keys can only be used once and are destroyed after the handshake
- DThe server’s private key is sent to the client so both can use it
A user logs in to a website over HTTPS on public Wi-Fi. An attacker on the same network captures every packet. What can the attacker read?
- AOnly ciphertext for the page data and password, because TLS encrypts it between the browser and the server
- BThe password, because HTTPS encrypts only the web page, not form data
- CEverything, because TLS protects data only between the router and the server
- DNothing at all, because TLS stops the packets from being captured
During a TLS handshake, a browser finds that the server’s certificate is in date and signed by a trusted CA, but was issued for a different domain name. What is the correct response?
- AWarn the user, because the server has not proved it is the site requested and could be an impostor
- BContinue silently, because the connection will still be encrypted with a session key
- CContinue silently, because a certificate signed by a trusted CA is always valid
- DAsk the server to send its private key so the browser can check its identity directly
An attacker records an entire TLS handshake, including the encrypted session key material sent by the client. Why can the attacker still not decrypt the session?
- AThe key material was encrypted with the server’s public key, and only the server’s private key can decrypt it
- BThe session key is hashed, and a hash can only be reversed by the client
- CThe certificate contains the session key, which is protected by the CA’s signature
- DThe session key was sent in plaintext, but over a separate secure cable
Quiz key
SSL/TLS encrypts the data between client and server, uses a digital certificate to authenticate the server, and adds message authentication codes so changes in transit are detected. Routing and addressing are done by the internet layer (IP). Compression and caching are performance features, not security. Malware and spam filtering are done by anti-malware software and firewalls, not by TLS.
The client opens with its request (4); the server replies with its cipher suite and certificate (2); the client checks the certificate (1); only then does it send the session key material encrypted with the server’s public key, taken from the certificate (5); finally both use the symmetric session key (3). 4, 1, 2 checks a certificate before receiving it. Starting with 2 has the server speak first. 4, 2, 5, 1 uses the public key before the certificate has been checked.
Asymmetric encryption is used only to share the session key safely, because it is slow; the bulk data is then encrypted with the fast symmetric session key. The session key must stay secret, or anyone could read the session. Key pairs are reused for many sessions. The server’s private key never leaves the server.
TLS sits between the application layer (HTTP) and TCP, so everything HTTP sends, including form data such as the password, is encrypted end to end between the browser and the server. Form data is part of the HTTP request and is encrypted with it. Protection covers the whole path from browser to server, not just part of it. The attacker can still capture the packets; they are simply unreadable.
The certificate proves only that its key belongs to the named domain; if that is not the domain requested, the server has not authenticated itself, so the browser warns the user (it could be a pharming or impostor site). Encryption alone is worthless if the other end is an attacker. A trusted signature does not help when the certificate is for a different site. A private key is never sent to anyone.
The client encrypted the key material with the server’s public key, so only the matching private key, which never leaves the server, can recover the session key. A hash is one-way and is not how the session key is protected. The certificate carries the server’s public key, not a session key, which is new for every session. Nothing is sent in plaintext over a separate cable.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.