GOAT EngineerPreparing your learning space…

System Design · Concept Library · Free article

TLS & HTTPS

How TLS protects data in transit, authenticates the named server, and establishes traffic keys for HTTPS.

TLS encrypts application content in transit, detects changes to protected records, and authenticates the named server under a trusted certificate chain. Network observers may still see metadata such as endpoints, timing, and traffic volume. The handshake derives traffic keys, but a protected connection does not make the site honest or its input trustworthy.

The s in https

Traffic sent without transport encryption can be read or modified by an observer on the path. That is unsafe for credentials, payments, and other private data.

TLS protects HTTP traffic in transit and gives HTTPS its s. Public web services should use it.

What HTTPS provides

  • Privacy: application content is encrypted in transit, although observers may still see connection metadata such as endpoints, timing, and volume.
  • Integrity: changes to protected records are detected and rejected.
  • Server authentication: the browser validates a certificate for the named host and proof that the server controls the matching private key. This does not prove the operator is honest.

The TLS handshake

The client and server need shared traffic keys, but they establish them over a network that others may observe. The TLS handshake derives those keys and authenticates the server without sending the resulting secrets over the connection.

The interactive version of this example is available when JavaScript loads.

Key agreement first, efficient encryption after

TLS uses two kinds of cryptography. During setup, a key exchange lets the client and server derive the same secrets without sending those secrets over the network. The server also signs the handshake to prove possession of the private key that matches its certificate. Once setup is complete, both sides use efficient symmetric keys to protect application data.

Certificates and the chain of trust

Encryption alone is not enough if an active attacker can impersonate the destination. During the handshake, the server presents a certificate for the hostname and signs the handshake to prove possession of the matching private key.

The certificate chains to a certificate authority trusted by the browser. The browser checks the chain, hostname, validity period, and handshake signature. If a required check fails, it stops the connection and shows a security warning.

The chain, simplified.
PieceRole
Certificate authorityA trusted signer your browser already knows about.
Site certificateBinds a public key to a hostname or set of hostnames under a trusted signature.
Your browserChecks the chain, hostname, validity period, and proof that the server controls the matching private key.

What the lock costs, and how it got cheaper

A full TLS 1.3 handshake normally adds one round trip before application data. Session resumption can reduce later setup, and connection reuse avoids repeating it for every request. Distance makes each setup round trip more expensive.

Common misconceptions

What to remember

Sources and further reading

By GOAT Engineer. Back to Concept Library. Privacy Policy · Contact.