TLS (Transport Layer Security) is the protocol that puts the “S” in HTTPS. It combines everything from this unit: asymmetric keys, certificates, hashes and symmetric encryption.

What TLS provides

  • Confidentiality through symmetric encryption of the session.
  • Integrity through authenticated encryption or message authentication codes.
  • Server authentication (and optionally client authentication) through certificates.

SSL is the old name. SSL 2.0, SSL 3.0, TLS 1.0 and 1.1 are deprecated; use TLS 1.2 or, preferably, TLS 1.3.

The handshake, simplified

  1. The client says hello and lists supported versions and cipher suites.
  2. The server replies with its choice and its certificate.
  3. The client validates the certificate chain, name and dates.
  4. Both sides use a key exchange (ephemeral Diffie-Hellman) to derive a shared session key.
  5. Both switch to fast symmetric encryption for the application data.

Forward secrecy comes from ephemeral keys: even if the server’s long-term private key is stolen later, recorded past sessions cannot be decrypted. TLS 1.3 mandates it and shortens the handshake.

HTTPS in practice

  • Install a certificate from a trusted CA (Let’s Encrypt is free) and renew it automatically.
  • Redirect HTTP to HTTPS and send the HSTS header so browsers refuse to downgrade.
  • Avoid mixed content, where an HTTPS page loads scripts over HTTP.
  • Disable old protocols and weak ciphers in server settings.
  • Protect the private key; if exposed, revoke and reissue.

HTTPS protects the connection, not the website. A phishing site can have a valid padlock, so the padlock means “encrypted to this domain”, not “trustworthy”.

Inspect your own lab

Check what a server you own supports:

openssl s_client -connect lab.example.local:443 -tls1_3
curl -sI https://lab.example.local | grep -i strict-transport

Free online checkers can grade public sites you manage. Only test servers you own or are authorized to test.

Check your understanding

1. Which TLS versions should be used today?

  • SSL 3.0
  • TLS 1.0
  • TLS 1.2 and 1.3
  • SSL 2.0

Answer: TLS 1.2 and 1.3. Earlier versions have known weaknesses.

2. What is the purpose of the session key?

  • To identify the website
  • To enable fast symmetric encryption of the data
  • To sign certificates
  • To store passwords

Answer: To enable fast symmetric encryption of the data. It is derived during the handshake.

3. What does forward secrecy protect against?

  • Phishing
  • Past recorded sessions being decrypted after a later key theft
  • DDoS
  • Weak passwords

Answer: Past recorded sessions being decrypted after a later key theft. Each session uses unique ephemeral keys.

4. A site shows a padlock. What can you conclude?

  • It is safe and honest
  • The connection to that domain is encrypted
  • It has no malware
  • It is a bank

Answer: The connection to that domain is encrypted. It says nothing about the site’s intent.