Skip to content
BoKSA

17 – TLS (formerly SSL) and HTTPS

17 – TLS (formerly SSL) and HTTPS

Course: ICT Basic course · Level: introductory Book: Kurose & Ross, 9th ed., chapter 8.6 (securing TCP connections: TLS)

Learning goals

After this article you can:

  • explain what TLS protects (confidentiality, integrity, server authentication) and where it sits in the protocol stack;
  • describe the history from SSL to TLS 1.3 and which versions are still allowed;
  • explain the steps of the TLS handshake (TLS 1.2 and 1.3) and the record protocol;
  • explain how certificates are validated, and what Let's Encrypt / ACME do;
  • analyse a TLS connection in Wireshark and test a website's TLS configuration.

1. What is TLS?

TLS (Transport Layer Security) creates a secure channel on top of a reliable transport (TCP). It gives:

  • Confidentiality: data is encrypted (AES-GCM, ChaCha20-Poly1305).
  • Integrity: every record has an authentication tag; changes are detected.
  • Authentication: the server proves its identity with a certificate. (Optionally the client too: mutual TLS, mTLS.)
1
2
3
4
5
6
7
8
9
 ┌───────────────────────┐
 │ HTTP, SMTP, IMAP, ... │   application
 ├───────────────────────┤
 │ TLS                   │   ← "between" application and transport (implemented as a library: OpenSSL, BoringSSL, rustls, SChannel)
 ├───────────────────────┤
 │ TCP                   │   transport
 ├───────────────────────┤
 │ IP                    │
 └───────────────────────┘

HTTPS = HTTP over TLS (port 443). TLS is also used for e-mail (IMAPS 993, SMTP STARTTLS), DNS over TLS (853), VPNs, MQTT (IoT), database connections, and more. In QUIC/HTTP/3, TLS 1.3 is built into the transport protocol.


2. From SSL to TLS 1.3

Version Year Status (2026)
SSL 2.0 1995 (Netscape) broken, forbidden
SSL 3.0 1996 broken (POODLE attack, 2014), forbidden
TLS 1.0 1999 deprecated (RFC 8996, 2021); removed from browsers
TLS 1.1 2006 deprecated (RFC 8996, 2021)
TLS 1.2 2008 still allowed with strong cipher suites (AEAD + ECDHE)
TLS 1.3 2018 (RFC 8446) current standard: faster, simpler, more secure. Used by the large majority of web connections

SSL or TLS? The name "SSL" is still used in everyday language ("SSL certificate", "SSL/TLS"), but every real secure connection today is TLS. In Wireshark the protocol filter is tls (old versions: ssl).


3. How TLS works

3.1 The idea (Kurose & Ross "toy TLS")

  1. Handshake: Alice (client) and Bob (server) set up a connection, Bob proves who he is with his certificate, and both agree on a shared master secret.
  2. Key derivation: from the master secret, both compute session keys (separate keys for each direction).
  3. Data transfer: data is split into records; every record is encrypted and authenticated.
  4. Closing: a special close_notify message (to prevent truncation attacks).

3.2 TLS 1.2 handshake (2 RTT)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 Client                                              Server
   │── ClientHello (versions, cipher suites, random) ──►│
   │◄─ ServerHello (chosen suite, random)               │
   │◄─ Certificate                                      │
   │◄─ ServerKeyExchange (ECDHE public value, signed)   │
   │◄─ ServerHelloDone                                  │
   │── ClientKeyExchange (ECDHE public value) ─────────►│
   │── ChangeCipherSpec, Finished ─────────────────────►│
   │◄─ ChangeCipherSpec, Finished                       │
   │═════════ encrypted application data ═══════════════│

3.3 TLS 1.3 handshake (1 RTT)

1
2
3
4
5
 Client                                                     Server
   │── ClientHello + key_share (X25519 / X25519MLKEM768) ────►│
   │◄─ ServerHello + key_share                               │
   │◄─ {EncryptedExtensions, Certificate, CertificateVerify, Finished}  ← already encrypted!
   │── {Finished} + encrypted application data ─────────────►│

What's better in TLS 1.3: - 1 RTT instead of 2 (and 0-RTT for resumed sessions, with some replay risks). - Only secure algorithms: RSA key exchange, static DH, CBC mode, RC4, SHA-1, MD5, compression and renegotiation are all removed. - Forward secrecy always (ephemeral (EC)DHE). - More of the handshake is encrypted, including the server certificate. - Simpler, so there are fewer implementation errors.

Cipher suite example: TLS_AES_128_GCM_SHA256 (TLS 1.3) or TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (TLS 1.2): key exchange ECDHE, authentication with RSA certificate, encryption AES-128-GCM, hash SHA-256.

3.4 The record protocol

Data is cut into records (max 16 KB). In TLS 1.3, each record is encrypted with an AEAD algorithm, using a sequence number as part of the nonce, so records can't be replayed, reordered or deleted without detection.


4. Certificates in practice

A browser accepts a server certificate only if:

  1. it is signed by a trusted CA (via a chain of intermediate certificates up to a root in the trust store);
  2. the domain name matches (in the Subject Alternative Name field);
  3. it is within its validity period;
  4. it is not revoked (revocation is moving towards short-lived certificates; OCSP is being phased out by some CAs);
  5. it is logged in Certificate Transparency.

Types of certificates

Type Validation Use
DV (Domain Validated) the CA checks that you control the domain most websites
OV (Organisation Validated) also checks the organisation companies
EV (Extended Validation) extensive check browsers no longer show a special green bar, so EV has lost most of its value
Wildcard *.example.nl all subdomains on one level

Let's Encrypt and ACME (updated)

  • Let's Encrypt (since 2015) gives free DV certificates, fully automated via the ACME protocol (RFC 8555). Tools: certbot, Caddy (automatic HTTPS), Traefik, cloud load balancers.
  • Thanks to this, the share of web traffic over HTTPS rose from about 40% (2015) to well over 90% today.
  • Shorter lifetimes: the CA/Browser Forum decided in 2025 that the maximum certificate lifetime goes from 398 days to 200 days (since 15 March 2026), 100 days (March 2027) and 47 days (March 2029). Automation is a must.

5. Try it yourself

  1. Wireshark TLS: start a capture, visit https://www.hva.nl, and filter on tls.
  2. Find the ClientHello: which TLS versions (supported_versions extension) and cipher suites does your browser offer? Which SNI (server name) is visible?
  3. Find the ServerHello: which version and cipher suite are chosen?
  4. Can you see the certificate? (In TLS 1.3: no, it's encrypted!)
  5. Can you see the HTTP content? Why not? (Or use the Kurose & Ross trace file for the Wireshark TLS exercise: https://gaia.cs.umass.edu/kurose_ross/wireshark.php.)
  6. Command line:
    1
    2
    curl -v https://www.hva.nl -o /dev/null        # look for "SSL connection using TLSv1.3"
    openssl s_client -connect www.hva.nl:443 -servername www.hva.nl </dev/null | openssl x509 -noout -subject -issuer -dates
    
    Who issued the certificate? When does it expire?
  7. Test a server: https://www.ssllabs.com/ssltest/ and https://www.internet.nl/. Which grade does your favourite website get?
  8. Byte by byte: go through every byte of a TLS 1.3 connection at https://tls13.xargs.org/.
  9. Decrypt your own traffic (advanced): set the environment variable SSLKEYLOGFILE before starting the browser and load the file in Wireshark (Preferences → Protocols → TLS).

Check your understanding

  1. What three security goals does TLS provide?
  2. Why should SSL 3.0 and TLS 1.0/1.1 no longer be used?
  3. Name three differences between TLS 1.2 and TLS 1.3.
  4. What is forward secrecy, and why does it matter?
  5. Which four checks does a browser do on a server certificate?
  6. What information is still visible to an eavesdropper in an HTTPS connection?

References

Book

  • Kurose & Ross, 9th ed., chapter 8.6

Videos

Articles, standards and tools


Cyber Security

Why is this important for cyber security?

  • TLS protects almost all Internet traffic: logins, banking, health data, APIs, e-mail. Without it, everything could be read and changed on public Wi-Fi, by ISPs or by attackers on the path.
  • But TLS only protects the connection, not the endpoints: a phishing site can have a perfectly valid certificate (the padlock means "encrypted", not "trustworthy"). Malware on your PC sees the data before it is encrypted.
  • Metadata is still visible: IP addresses, the server name in the SNI (unless Encrypted Client Hello, ECH is used), traffic volume and timing.
  • Known attacks and failures:
Problem Example
Implementation bugs Heartbleed (OpenSSL, 2014): read server memory, including private keys
Old protocols / weak ciphers POODLE (SSL 3.0), BEAST, RC4 weaknesses, downgrade attacks (FREAK, Logjam)
Expired certificates outages at large companies (e.g. Microsoft Teams in February 2020)
Compromised or careless CAs DigiNotar (2011)
TLS interception company firewalls/antivirus that break up TLS can weaken security if badly implemented
Stolen private keys attacker can impersonate the server (and without forward secrecy, decrypt old traffic)

What can you do to make it safe?

  • Only allow TLS 1.2 and 1.3, with strong (AEAD, ECDHE) cipher suites. Use the Mozilla SSL Configuration Generator and the NCSC TLS guidelines.
  • Automate certificates (ACME/Let's Encrypt, cert-manager in Kubernetes), with monitoring and alerts for expiry, especially now that lifetimes are getting shorter.
  • Turn on HSTS (and consider the HSTS preload list), redirect HTTP → HTTPS.
  • Protect private keys (permissions, HSM/key vault) and use CAA records in DNS to limit which CAs may issue certificates for your domain.
  • Keep TLS libraries up to date (OpenSSL, etc.).
  • Monitor Certificate Transparency for unexpected certificates for your domains.
  • Use mTLS (client certificates) for machine-to-machine communication (APIs, microservices, IoT).
  • Test regularly with SSL Labs, internet.nl or testssl.sh.

Extra references