Bookmarks

TLS — TLS protocol

Transport Layer Security

A cryptographic protocol that encrypts data between two programs, detects tampering along the way and uses a certificate to verify that the server is who it claims to be.

Also: ssl, transport layer security

checked 9 Nov

All terms

Almost all secure internet traffic, including HTTPS, email and messaging, runs on top of TLS. The name appeared in 1999, when the IETF standardised TLS 1.0, which was based on Netscape’s SSL 3.0: the differences were small, but the versions could not work with each other directly. The name SSL lives on in everyday speech and in the names of settings.

What TLS provides

  • Encryption: only the parties to a connection can read its contents; an eavesdropper is left with addresses, volume and timing.
  • Integrity: any change to the data along the way is detected and terminates the connection.
  • Authenticity: the server (and, with mTLS, the client too) proves its identity with an X.509 certificate signed by a certificate authority.

Versions and their status

VersionYear and documentStatus
SSL 2.01995, Netscapeprohibited in 2011 (RFC 6176)
SSL 3.01996, Netscapeprohibited in 2015 after the POODLE attack (RFC 7568)
TLS 1.01999, RFC 2246prohibited together with TLS 1.1 (RFC 8996)
TLS 1.12006, RFC 4346prohibited together with TLS 1.0 (RFC 8996)
TLS 1.22008, RFC 5246working version, still widely used
TLS 1.32018, RFC 8446current version, recommended for new systems

For UDP there is the DTLS variant, which gives the same guarantees for datagrams: DTLS 1.3 is described in RFC 9147. The same TLS runs inside HTTPS, SMTP and IMAP, databases and messengers; it is invisible from above, so the same connection can be protected anywhere.

How a connection is established

First the two sides perform a handshake: they agree on the version and ciphers, the server presents its certificate, and keys are derived from a shared secret. TLS 1.3 removed obsolete ciphers and RSA key exchange from the handshake, and the exchange itself takes a single round trip; when resuming a known connection, data can be sent in the very first packet (0-RTT). You can check what a real connection negotiated like this:

bash
$ openssl s_client -connect example.org:443 -briefCONNECTION ESTABLISHEDProtocol version: TLSv1.3Ciphersuite: TLS_AES_128_GCM_SHA256

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • HTTPSHTTPS

    HTTPS is HTTP over TLS; TLS itself is transport-independent and protects any protocol: email, databases, messengers.

  • SSHSSH protocol

    SSH protects server login and tunnels and usually relies on its own keys rather than X.509; TLS uses X.509 certificates.

  • VPNvirtual private network

    A VPN encrypts all of a device’s traffic into a tunnel to a network; TLS protects a single application’s connection.

In depth in the references

where the topic is covered in detail