TLS/SSL Fundamentals: Three Core Guarantees and Protocol Phases
Two Phase Protocol Structure
TLS operates in two distinct phases. The handshake phase establishes a secure connection: the client and server negotiate which cryptographic algorithms to use, the server proves its identity using a certificate, and both sides derive shared secret keys. Once the handshake completes, the record protocol phase begins, where all application data is encrypted using the negotiated symmetric cipher. The handshake uses computationally expensive asymmetric cryptography (operations involving key pairs), while the record protocol uses fast symmetric cryptography (operations using shared keys) for bulk data.
RTT (Round Trip Time, the time for a packet to travel to the server and back) directly determines handshake latency. TLS 1.2 requires 2 round trips after the TCP connection establishes, meaning 3 RTTs total before any application data flows. On a 200ms intercontinental path, this adds 600ms of latency before the first byte of content. TLS 1.3 reduces this to 1 RTT for TLS (2 RTTs total), saving 200ms on that same path.
Asymmetric and Symmetric Cryptography
The handshake combines two cryptographic operations. Key exchange algorithms like ECDHE (Elliptic Curve Diffie-Hellman Ephemeral) allow two parties to derive a shared secret over an insecure channel without ever transmitting the secret itself. The ephemeral part means new keys are generated for each connection, providing forward secrecy: if an attacker later compromises long term keys, they cannot decrypt past sessions. Common curves include X25519 (a modern curve optimized for performance and security) and P-256 (an older NIST standard with broader compatibility).
Once the handshake derives session keys, the record protocol encrypts data using symmetric ciphers. AES-GCM (Advanced Encryption Standard in Galois Counter Mode) provides both encryption and authentication in a single operation, achieving 2 to 5 Gbps per core on CPUs with hardware acceleration. ChaCha20-Poly1305 is an alternative designed for software implementation, often 2 to 3x faster than AES-GCM on devices lacking dedicated AES hardware (most mobile processors).
Certificate Based Authentication
Servers prove identity using certificates signed by Certificate Authorities (CAs), trusted third parties whose root certificates ship with browsers and operating systems. When a server presents its certificate, the client verifies the signature chain back to a trusted root. Modern certificates use 90 day lifetimes (versus the 398 day browser maximum) to limit exposure if private keys are compromised. Short lifetimes require automated renewal, typically using ACME (Automated Certificate Management Environment), a protocol that proves domain ownership and issues certificates without manual intervention.