TLS is the cryptographic protocol that secures HTTPS connections, encrypts data in transit, and authenticates servers on the internet.
TL;DR TLS (Transport Layer Security) is a cryptographic protocol that encrypts communication between a client (browser, app) and a server over the internet. TLS protects data in transit from interception and tampering. Every HTTPS connection uses TLS. TLS 1.3, the current standard, completes the security handshake in one round-trip (1-RTT), compared to two round-trips in TLS 1.2, reducing connection latency by 30–50ms on average. SSL is the older predecessor to TLS and is now considered insecure — all references to “SSL” in modern systems actually mean TLS.
What is TLS?
TLS (Transport Layer Security) is a cryptographic protocol that provides three guarantees for data transmitted over a network:
- Confidentiality — Data is encrypted and cannot be read by third parties intercepting the connection.
- Integrity — Data cannot be altered in transit without detection.
- Authentication — The server proves its identity using a digital certificate signed by a trusted Certificate Authority (CA).
TLS operates at the transport layer. It sits between the application layer (HTTP, SMTP, gRPC) and the TCP layer, creating an encrypted tunnel through which application data travels.
TLS vs SSL: what’s the difference?
SSL (Secure Sockets Layer) is the predecessor to TLS. SSL 2.0 was released in 1995. SSL 3.0 was released in 1996 and deprecated in 2015 due to the POODLE vulnerability.
TLS 1.0 replaced SSL 3.0 in 1999. TLS 1.1, 1.2, and 1.3 followed. Today, all versions of SSL are deprecated and insecure. When people say “SSL certificate” or “SSL connection,” they mean TLS — the terminology persists, but the protocol is TLS.
| Version | Year | Status |
|---|---|---|
| SSL 2.0 | 1995 | Deprecated — do not use |
| SSL 3.0 | 1996 | Deprecated — do not use |
| TLS 1.0 | 1999 | Deprecated — do not use |
| TLS 1.1 | 2006 | Deprecated — do not use |
| TLS 1.2 | 2008 | Supported — widely deployed |
| TLS 1.3 | 2018 | Current standard — preferred |
How TLS works: the handshake
Before encrypted data flows, the client and server perform a TLS handshake to agree on encryption parameters and verify identity.
TLS 1.3 handshake (1-RTT):
- ClientHello — Client sends supported cipher suites and a key share.
- ServerHello + Certificate + Finished — Server selects cipher suite, sends its certificate, and completes key derivation in one message.
- Client Finished — Client verifies the certificate and sends its Finished message. Encrypted application data begins immediately.
TLS 1.2 handshake (2-RTT): TLS 1.2 required two full round-trips before data could flow, adding 60–100ms of latency on a typical 30ms RTT connection. TLS 1.3 reduced this to one round-trip.
| Feature | TLS 1.2 | TLS 1.3 |
|---|---|---|
| Handshake round-trips | 2-RTT | 1-RTT |
| 0-RTT session resumption | No | Yes (replay-attack risk on non-idempotent requests) |
| Forward secrecy | Optional | Mandatory |
| Certificate encryption | No | Yes (encrypted in transit) |
| Supported cipher suites | Many (including weak ones) | 5 (all strong AEAD) |
| Performance improvement | Baseline | ~30–50ms faster per new connection |
TLS certificates and the chain of trust
A TLS certificate is a digital document that proves a server’s identity. It contains the server’s public key and is signed by a Certificate Authority (CA).
Certificate validation chain:
- Root CA — Trusted by operating systems and browsers. Root CA private keys are kept offline.
- Intermediate CA — Issues end-entity certificates, protecting the Root CA from direct exposure.
- Leaf certificate — Installed on the server. Contains the domain name and public key.
A certificate is valid if: (1) its signature chain leads to a trusted Root CA, (2) the domain matches the certificate’s Subject Alternative Name (SAN), and (3) it hasn’t expired or been revoked.
Let’s Encrypt issues free, automatically renewing TLS certificates for any publicly accessible domain via the ACME protocol.
Cipher suites in TLS
A cipher suite is the combination of cryptographic algorithms used in a TLS connection. TLS 1.3 supports only 5 cipher suites, all using AEAD (Authenticated Encryption with Associated Data):
TLS_AES_128_GCM_SHA256TLS_AES_256_GCM_SHA384TLS_CHACHA20_POLY1305_SHA256TLS_AES_128_CCM_SHA256TLS_AES_128_CCM_8_SHA256
TLS 1.2 supports hundreds of cipher suites, including weak ones like RC4 and 3DES. Disabling weak cipher suites is a required step in TLS hardening.
Common TLS errors and causes
| Error | Cause |
|---|---|
SSL_ERROR_HANDSHAKE_FAILURE | Client and server share no common cipher suite or TLS version |
ERR_CERT_DATE_INVALID | Certificate has expired |
ERR_CERT_COMMON_NAME_INVALID | Certificate domain doesn’t match the requested domain |
ERR_SSL_VERSION_OR_CIPHER_MISMATCH | Client and server support incompatible TLS versions or cipher suites |
CERTIFICATE_VERIFY_FAILED | Certificate chain is broken or root CA is not trusted |
| Handshake timeout | Network issue or firewall blocking TLS traffic on port 443 |
TLS hardening checklist
- Disable SSL 2.0, SSL 3.0, TLS 1.0, and TLS 1.1.
- Enable TLS 1.3 as the preferred version.
- Use only AEAD cipher suites (AES-GCM, ChaCha20-Poly1305).
- Enable HSTS (
Strict-Transport-Security) withincludeSubDomainsandpreload. - Use ephemeral key exchange algorithms (ECDHE) to enforce Perfect Forward Secrecy.
- Automate certificate renewal to prevent expiration (Let’s Encrypt + ACME).
- Enable OCSP stapling to reduce revocation check latency.
Frequently asked questions
What is TLS in simple terms? TLS is the technology that puts the padlock in your browser’s address bar. It encrypts data between your browser and a website so no one can intercept or read it in transit.
Is SSL the same as TLS? No, but for practical purposes they refer to the same thing. SSL is the older protocol (now deprecated and insecure). TLS is the modern replacement. When you see “SSL certificate” or “SSL connection,” the actual protocol being used is TLS.
What is the TLS handshake? The TLS handshake is the negotiation process that happens before encrypted data flows. The client and server agree on a cipher suite, the server proves its identity with a certificate, and both sides derive a shared encryption key. In TLS 1.3, this takes one round-trip.
Why is TLS 1.3 faster than TLS 1.2? TLS 1.3 completes the handshake in one round-trip instead of two. On a connection with 50ms RTT, this saves approximately 50ms per new connection. TLS 1.3 also supports 0-RTT session resumption for returning users.
What happens when a TLS certificate expires? When a TLS certificate expires, browsers reject the connection and display a security warning. Users see errors like “Your connection is not private.” Automated certificate renewal (e.g., via Let’s Encrypt and the ACME protocol) prevents this.
What is mTLS? mTLS (mutual TLS) requires both the client and the server to present certificates. Standard TLS only authenticates the server. mTLS authenticates both parties, making it common in API security, B2B integrations, and IoT device authentication.
What is Perfect Forward Secrecy (PFS)? PFS means that each TLS session uses a unique, temporary encryption key. If a server’s private key is compromised in the future, past sessions cannot be decrypted because their session keys were never stored. TLS 1.3 mandates PFS for all connections.
What port does TLS use? HTTPS (HTTP over TLS) uses port 443 by default. Other TLS-protected services use their own ports — SMTPS uses 465, IMAPS uses 993.