The handshake and encryption that keep a connection private and prove who you are talking to.
TLS (Transport Layer Security) is the protocol that makes a connection private and proves who you are talking to. It is the "S" in HTTPS. SSL is its old name, and today everyone really uses TLS.
Plain HTTP sends everything as readable text. Anyone on the same Wi-Fi, or on any machine along the route, can read your password or change the page. TLS adds a protective layer between your app (HTTP) and the network (TCP). HTTP over TLS is called HTTPS.
TLS uses two kinds of cryptography together. Asymmetric cryptography (key pairs) is used in the handshake to agree on a secret and to prove identity, but it is slow. Symmetric cryptography (one shared key) is used for the actual data, because it is very fast.
Identity comes from certificates. A certificate says "this public key belongs to shop.example.com" and is signed by a Certificate Authority (CA) that browsers already trust. The server proves it owns the certificate by signing the handshake with the matching private key.
| Piece | What it does | Plain meaning |
|---|---|---|
| Certificate | Binds a public key to a site name, with valid dates, signed by a CA | The server's passport |
| Private key | Stays secret on the server. Used to sign the handshake. | Proof that you own the passport |
| Certificate Authority (CA) | A trusted organisation that signs certificates after checking the owner | The passport office |
| Chain of trust | Site certificate, signed by an intermediate CA, signed by a root CA in the browser's trust store | A chain of signatures back to someone you trust |
| Key exchange (ECDHE) | Both sides create a one-time secret using ephemeral key pairs | Agreeing a code in public |
| Cipher suite | The set of algorithms used (key exchange, encryption, hashing) | The agreed list of tools |
| SNI | The browser names the site in the first message, so one IP can host many sites | Which door you are knocking on |
| TLS 1.2 | TLS 1.3 | |
|---|---|---|
| Handshake round trips | 2 | 1 (and 0-RTT resumption, with some replay risk) |
| Forward secrecy | Only if an ephemeral cipher suite (ECDHE) is chosen | Always |
| Old, weak options | Many are still allowed (RC4, CBC modes, static RSA key exchange) | Removed |
| Certificate visible to observers | Yes | No, it is encrypted |
| Today | Still common, acceptable when configured well | Preferred |
a9 4f 03 d7 5c e1 88 2b 7e 90 b4 16 f2 6d 31 c8 ...A simplified model: it counts network round trips only and ignores computing time, packet loss and TLS features such as session resumption. Real set-up time depends on the route and the servers.
| Term | Meaning in easy words |
|---|---|
| TLS | Transport Layer Security: the protocol that encrypts and authenticates connections |
| SSL | The old name and the older versions of TLS. Obsolete, but the name stuck. |
| HTTPS | HTTP carried over TLS |
| Certificate | A signed document that links a public key to a site name |
| Certificate Authority (CA) | A trusted organisation that signs certificates |
| Chain of trust | The line of signatures from the site certificate up to a trusted root |
| Handshake | The opening exchange where both sides agree on keys and the server proves its identity |
| Symmetric encryption | One shared key encrypts and decrypts. Fast, used for the data. |
| Asymmetric encryption | A public and private key pair. Slower, used for identity and key agreement. |
| Forward secrecy | Past traffic stays safe even if the server's long-term private key is stolen later |
| mTLS | Mutual TLS: the client also shows a certificate, so both sides are authenticated |
| SNI | Server Name Indication: the site name the browser sends, so one IP can serve many sites |
| HSTS | A header that tells browsers to use only HTTPS for your site |
| Choice | We gain | We lose |
|---|---|---|
| Terminate TLS at the load balancer | One place to manage certificates, less CPU on the app | Traffic inside is not protected unless re-encrypted |
| Re-encrypt to the backend | Protected end to end inside the network | More certificates and more CPU |
| mTLS between services | Strong service identity, no network trust assumed | More set-up (a CA, rotation); a mesh usually handles it |
| Short-lived certificates | A stolen key is useful only briefly | Needs reliable automation |
| Long-lived certificates | Fewer renewals | A forgotten expiry is an outage, and a stolen key lasts longer |
| TLS 1.3 only | Fastest and safest | Very old clients cannot connect |