An independent engineering field journalUnderstanding the systems behind the screen
Field note   ·   November 2026

Before HTTPS is encrypted, two computers have to agree on something

TLS 1.3 is more than a padlock. Understand certificate verification, ephemeral keys, SNI, and why a connected socket is not yet a trusted application.

Documenting the mechanism. Testing assumptions. Keeping the unknowns visible.

A TCP connection isn't proof of identity.

When I first started reading about HTTPS, I mentally put a lock around the entire connection and moved on. But the moment worth understanding is how two endpoints establish keys and how the client knows whom it is talking to. Without that, a “successful connection” tells you much less than you think.

Transport and security answer different questions. TCP can connect to any process listening at the destination IP and port. TLS provides a mechanism to establish encrypted traffic and authenticate an endpoint. The browser still needs to validate the certificate for the hostname the user intended to visit.

The ClientHello starts the negotiation.

In a typical TLS 1.3 connection over TCP, the client sends a ClientHello describing supported cryptographic options and providing key-agreement material. The server responds with its own handshake messages and certificate. The parties derive shared secrets for the connection's traffic keys.

TLS 1.3 handshake (high level)
Client                               Server
ClientHello + key share  ----------->
                       <------------- ServerHello + key share
                       <------------- EncryptedExtensions
                       <------------- Certificate + verification
                       <------------- Finished
Finished              -------------->
Encrypted application data ⇄ encrypted data
Several server messages are protected by handshake keys; this is conceptual, not a byte-for-byte packet capture.

A certificate is evidence, not magic.

A certificate binds a public key to identifiers such as a DNS name, with a chain toward a trusted certificate authority. A browser checks whether it trusts that chain, whether the certificate is valid for the requested hostname, and other policy constraints. A correct IP address with the wrong certificate is still a problem.

This is why “ping works” or “TCP port 443 is open” cannot confirm HTTPS is operational. Ping is a network-layer test. A TLS failure occurs later, after enough transport connectivity exists to attempt the handshake.

Encryption keys are not simply mailed across the network.

Modern TLS 1.3 handshakes typically use ephemeral Diffie–Hellman key agreement. Each endpoint contributes key material; a shared secret is derived without transmitting the final traffic key as plain text. Ephemeral key exchange can provide forward secrecy, reducing the impact of a later compromise of a server's long-term certificate key on previously recorded sessions.

Some handshake metadata remains visible, and what is exposed depends on the protocol and negotiated extensions. SNI traditionally indicated the target hostname to a shared server; newer mechanisms such as Encrypted ClientHello (ECH) aim to protect that information when supported. Avoid assuming that all HTTPS metadata is hidden—or that all of it is always public.

ALPN explains which application protocol comes next.

During TLS negotiation, Application-Layer Protocol Negotiation (ALPN) can determine whether the parties use http/1.1, h2, or another supported application protocol. The TLS handshake is not just about encryption; it helps establish how the application will speak after setup.

HTTP/3 handles the handshake differently.

HTTP/3 uses QUIC, which integrates TLS 1.3 into QUIC connection establishment over UDP. That is why drawing “HTTP/3 → TLS over TCP” is incorrect. The security goals remain familiar, but the packet framing and connection setup are QUIC's.

Look at a real HTTPS server's certificate.

# macOS includes an OpenSSL-compatible client in many setups
openssl s_client -connect example.com:443 \
  -servername example.com -showcerts

# Easier overview from curl
curl -Iv https://example.com

Inspect the certificate subject or SAN, issuer, validation result, and negotiated protocol. On modern systems the displayed output depends on which TLS library your command uses.

Learning checkpoint

Can an application have working DNS and TCP connectivity but still fail to establish HTTPS?

Yes. Certificate trust, hostname mismatch, TLS configuration, and negotiation can all fail after the client reaches a listening transport endpoint.

← All articlesFollow the learning path ↗