HTTPS & TLS Handshake
The web encryption standard that authenticates servers via TLS certificates and negotiates symmetric session keys for confidential, tamper-proof HTTP traffic
Table of Contents
Structure Diagram
What is HTTPS & TLS Handshake?
The web encryption standard that authenticates servers via TLS certificates and negotiates symmetric session keys for confidential, tamper-proof HTTP traffic. It is a core concept in Auth & Security within Web Dev.
Core Principles
HTTPS wraps plain HTTP inside TLS (Transport Layer Security) to guarantee confidentiality (no eavesdropping), integrity (no tampering), and authentication (verifying the server's identity via CA-signed certificates).
A TLS handshake combines asymmetric and symmetric cryptography: it verifies the server's certificate and uses Ephemeral Diffie-Hellman (ECDHE) to agree on a shared symmetric session key, then encrypts bulk HTTP traffic rapidly with AES-GCM or ChaCha20. Modern TLS 1.3 completes this in just 1-RTT and mandates Forward Secrecy.
Practical Takeaways
- Enable HSTS: Sending
Strict-Transport-Security: max-age=31536000; includeSubDomainsforces browsers onto HTTPS automatically, preventing SSL-stripping downgrade attacks. - Automate certificate renewal: Expired TLS certificates cause instant total outages. Use automated ACME / Let's Encrypt, AWS ACM, or Cloudflare managed certs with expiration monitoring.
- Disable legacy TLS versions: Turn off TLS 1.0/1.1 and weak ciphers on your load balancers; prioritize TLS 1.3 with HTTP/2 or HTTP/3.
Notable Examples
- Mandatory Secure Context: Modern browser capabilities (
Securecookies, Service Workers, WebAuthn, Clipboard API) require HTTPS. - mTLS (Mutual TLS): Used in open banking and Zero-Trust service meshes where both client and server present certificates.