SSL/TLS: How Internet Encryption Works

· James Thornton · 9 min read

SSL/TLS (Secure Sockets Layer / Transport Layer Security) is the encryption technology that protects data traveling between your browser and a web server. Every time you see a padlock icon in your browser's address bar, TLS is actively encrypting your connection — preventing eavesdroppers from reading your passwords, credit card numbers, or personal data. The evolution of SSL/TLS from Netscape's first implementation in 1995 to today's TLS 1.3 is a story of cryptographic arms races and the relentless pursuit of both security and performance. CDNs play a critical role in TLS deployment, handling TLS configuration at edge servers worldwide.

What Is the History of SSL and TLS?

The journey from unencrypted web traffic to today's TLS 1.3 spans three decades of cryptographic innovation:

TLS 1.2 vs TLS 1.3 Handshake — TLS 1.3 reduces connection setup from 2 round trips to 1, with 0-RTT TLS 1.2 vs TLS 1.3 Handshake Comparison — Reduced round trips TLS 1.2 (2 RTT) TLS 1.3 (1 RTT) Client Server ClientHello + cipher list ServerHello + cert + key share RTT 1 Client key exchange + Finished Server Finished RTT 2 Application Data Begins Client Server ClientHello + key share ServerHello + cert + Finished RTT 1 Application Data Begins 50% faster connection setup! 0-RTT for repeat connections: data sent with very first packet
Figure 1: TLS 1.2 vs TLS 1.3 Handshake — TLS 1.3 reduces connection setup from 2 round trips to 1, with 0-RTT possible for repeat connections

How Does the TLS Handshake Work?

The TLS handshake is the cryptographic negotiation that establishes a secure connection. In TLS 1.3, the simplified process works as follows:

Performance Comparison: Edge vs Origin Processing
Metric Edge Processing Origin Processing Improvement
Latency (p50)8–15 ms120–300 ms15–20x faster
Cache Hit Ratio85–95%N/AReduces origin load
TLS Handshake1–5 ms (nearby PoP)50–150 ms10–30x faster
Bandwidth Cost$0.01–0.04/GB$0.05–0.12/GB3–5x cheaper
Availability99.99% (multi-PoP)99.9% (single DC)10x fewer outages
  1. Client Hello: The client sends supported TLS versions, cipher suites, and a key share (its half of the key exchange). Unlike TLS 1.2, the client proactively sends key material in the first message, saving a round trip.
  2. Server Hello: The server selects a cipher suite, sends its certificate (proving its identity), its own key share, and immediately sends its Finished message — all in one flight.
  3. Client Finished: The client verifies the server's certificate, computes the shared secret, and sends its Finished message. Application data can be sent alongside this message.

The shared secret derived from both key shares is used to generate symmetric encryption keys (typically AES-256-GCM or ChaCha20-Poly1305) for the remainder of the connection. This "hybrid" approach — asymmetric cryptography for key exchange, symmetric for data encryption — balances security with performance.

What Types of TLS Certificates Exist?

TypeValidation LevelIssuance TimeCostBest For
DV (Domain Validation)Proves domain ownershipMinutesFree-$50/yrBlogs, small sites
OV (Organization Validation)Verifies organization identity1-3 days$100-300/yrBusiness websites
EV (Extended Validation)Rigorous identity verification1-2 weeks$200-1000/yrBanks, e-commerce
WildcardCovers all subdomains (*.domain.com)Varies$50-500/yrMultiple subdomains
SAN (Multi-Domain)Multiple domains on one certVaries$100-400/yrManaging several domains

How Did Let's Encrypt Change Everything?

Before 2015, obtaining a TLS certificate required paying a Certificate Authority (CA) $50-300+ per year and navigating a complex manual process. This cost barrier meant that only 30% of web pages used HTTPS by the end of 2015.

Let's Encrypt, launched in April 2016 by the Internet Security Research Group (ISRG), changed everything by offering free, automated certificates via the ACME (Automatic Certificate Management Environment) protocol. The impact was transformative:

CDN providers leveraged Let's Encrypt (and their own CAs) to offer automatic TLS for all customers. Cloudflare's "Universal SSL" (2014) provided free HTTPS to all plans, and most CDN providers now handle certificate issuance, renewal, and deployment automatically at the edge.

How Do CDNs Handle TLS at the Edge?

CDN TLS architecture involves several components that work together:

CDN TLS Architecture — The CDN terminates TLS at the nearest edge server for minimal latency, then r CDN TLS Architecture — Edge termination and origin re-encryption CDN TLS Edge Termination User Browser TLS 1.3 Client CDN Edge Server TLS Termination Point Certificate + Private Key OCSP Stapling Session Resumption (0-RTT) Origin Server Origin Certificate TLS 1.3 ~5ms RTT TLS (Full) ~50ms RTT End-to-End Encryption: User ←→ Edge ←→ Origin Edge termination reduces TLS handshake latency from 200ms to 5ms for end users
Figure 2: CDN TLS Architecture — The CDN terminates TLS at the nearest edge server for minimal latency, then re-encrypts traffic to the origin

External References

References & Standards: RFC 7234 · HTTP/2 specification