Skip to main content

Security

What is SSL/TLS?

Definition

TLS is the protocol that encrypts and authenticates network connections, and SSL is its obsolete predecessor whose name survives in 'SSL certificate'.

Also known as: TLS, SSL, Transport Layer Security

SSL/TLS in more detail

TLS wraps an ordinary TCP connection in three guarantees: nobody on the path can read the traffic, nobody can alter it undetected, and the client can confirm the server is really the host it asked for. HTTPS is simply HTTP inside that wrapper, but the same protocol also protects mail, database connections, message queues and anything else that opens a socket.

The handshake does the setup. The client offers the versions and cipher suites it supports, the server picks one and presents its certificate, the two sides agree a fresh symmetric key using an ephemeral Diffie-Hellman exchange, and everything afterwards is encrypted with that key. Ephemeral keys give forward secrecy: recording the traffic and stealing the server's private key later still does not decrypt the old session. TLS 1.3 trimmed the handshake to one round trip and removed the legacy ciphers that caused most downgrade attacks.

Authentication rests on certificates. A certificate binds a domain name to a public key and is signed by a certificate authority your system already trusts, forming a chain up to a root in the trust store. Without that check, encryption alone would only guarantee a private conversation with whoever answered. The naming is historical: SSL 2.0 and 3.0 are long dead and disabled everywhere, TLS 1.0 and 1.1 are deprecated, and current deployments run TLS 1.2 or 1.3 while still calling the file an SSL certificate.

SSL/TLS example

$ openssl s_client -connect example.com:443 -tls1_3

  Certificate chain
   0 s:CN = example.com          <- leaf, names the domain
     i:C = US, O = Let's Encrypt, CN = R11
   1 s:C = US, O = Let's Encrypt, CN = R11   <- intermediate
     i:C = US, O = ISRG, CN = ISRG Root X1   <- root, in the
                                                trust store
  Protocol  : TLSv1.3
  Cipher    : TLS_AES_256_GCM_SHA384
  Verify return code: 0 (ok)

Version status
  SSL 2.0 / 3.0   broken, removed
  TLS 1.0 / 1.1   deprecated
  TLS 1.2 / 1.3   current

SSL/TLS — common questions

What is the difference between SSL and TLS?
They are successive versions of the same idea. SSL was the original protocol from Netscape and all its versions are insecure and disabled; TLS is the IETF standard that replaced it. The word SSL persists in product names and in the phrase SSL certificate.
What does an SSL certificate actually prove?
That the holder controls the domain named in it, as vouched for by a certificate authority. A domain-validated certificate says nothing about the organisation behind the site or whether it is trustworthy.
What is forward secrecy?
The property that a session key is generated fresh per connection and discarded, so capturing traffic today and obtaining the server's private key tomorrow does not decrypt it. It is achieved through ephemeral Diffie-Hellman and is mandatory in TLS 1.3.

Keep reading

Every definition in the set is indexed A-Z in the developer glossary, and the cheat sheets cover the syntax once you know what you are looking for.

Browse the A-Z glossary