← Back to Security

HTTPS Handshake and Trust Model

HTTPS handshakes, certificate checks, and encrypted HTTP over TLS.

SecurityEncryptionHTTPS

HTTPS is HTTP carried inside Transport Layer Security, or TLS. Its job is not only to encrypt bytes on the wire. A proper HTTPS connection gives confidentiality, integrity, and server authentication. Confidentiality means an eavesdropper cannot read the traffic. Integrity means an attacker cannot alter the traffic unnoticed. Authentication means the browser can verify it is really talking to the site named in the URL, assuming the certificate system has not been compromised.

The handshake before any page loads

When a browser connects to https://example.com, it first opens a TCP connection and then starts a TLS handshake. The client sends a ClientHello message with supported cipher suites, protocol versions, and a random value. The server replies with a ServerHello, chooses the cryptographic parameters, and sends its certificate chain. That certificate binds the domain name to a public key and is signed by a certificate authority the browser trusts.

The browser verifies several things before it accepts the certificate: the signature chain, the hostname, and the validity period. If any of those checks fail, the browser warns the user because the server's identity is uncertain.

Modern TLS then performs a key exchange, usually with ephemeral Diffie-Hellman. Each side contributes fresh key material, and both derive shared session keys without sending those keys directly over the network. Those derived symmetric keys are what protect the HTTP traffic. Symmetric encryption is used for the data phase because it is much faster than public key cryptography.

Why HTTPS uses both asymmetric and symmetric crypto

Public key cryptography solves the trust problem at the start of the connection. The server can prove possession of the private key that matches its certificate. But public key operations are too expensive to use for every byte of application data. Once the handshake authenticates the parties and establishes shared secrets, symmetric ciphers handle the bulk transfer efficiently.

TLS also attaches authentication tags to encrypted records. That is how integrity is enforced. An attacker who flips bits in transit will cause record verification to fail, so the connection is rejected instead of silently corrupted.

What HTTPS protects and what it does not

HTTPS protects data in transit between two points. It does not secure data once it reaches the server. If the server stores passwords badly or logs secrets in plain text, TLS does not help. HTTPS also does not automatically hide metadata such as the destination IP address, and some handshake information may still be observable depending on protocol features.

Certificates can also expire, be misissued, or be deployed incorrectly. Operational failures are common: missing intermediate certificates, mixed content on a page, old TLS versions still enabled, or a load balancer terminating TLS but forwarding plain HTTP internally without proper network controls.

Why the extra work is worth it

Without HTTPS, anyone on the path can read cookies, session tokens, form data, and API payloads. With HTTPS, a passive observer mostly sees encrypted records. That is why browsers now treat plain HTTP as unsafe for most user interactions.

In practice, HTTPS is a system, not a single switch. Certificate issuance, renewal automation, secure cipher selection, HSTS, and correct proxy configuration all matter. When those pieces are in place, HTTPS turns the open internet into a channel that is private enough and trustworthy enough for everyday commerce, identity, and application traffic.