What is tls handshake
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 1, 2026
Key Facts
- The TLS handshake authenticates the server's identity through a digital certificate signed by a trusted certificate authority
- TLS 1.2 handshakes typically require 2 round-trips of communication between client and server
- TLS 1.3 reduced the handshake to 1 round-trip in most scenarios, improving connection speed by approximately 25%
- During the handshake, the client and server agree on a shared encryption key used for all subsequent data transmission
- The handshake prevents man-in-the-middle attacks and ensures only authorized parties can establish and decrypt the connection
What is the TLS Handshake?
The TLS handshake is the initial negotiation process between a client and a server that establishes a secure connection before any data is transmitted. It's a critical security mechanism that authenticates the server (and optionally the client), agrees on encryption methods, and generates the shared secret key that encrypts all subsequent communications. Without the handshake, secure communication would be impossible—it's the foundation of all HTTPS connections, secure emails, and encrypted communications across the internet.
The TLS 1.2 Handshake Process
The TLS 1.2 handshake typically involves the following steps:
- ClientHello - The client sends a message listing supported TLS versions, cipher suites, and other parameters
- ServerHello - The server responds by selecting a TLS version and cipher suite from the client's options
- Certificate - The server sends its digital certificate to prove its identity
- Key Exchange - The client and server exchange information to establish a shared secret key
- Finished - Both parties send a verification message confirming the handshake is complete
This process typically requires two round-trips of communication between the client and server, adding latency to connection establishment.
The TLS 1.3 Handshake
TLS 1.3 streamlined this process significantly. The main improvements include reducing the handshake to just one round-trip in typical scenarios. The client can now send its key share in the initial ClientHello message, and the server can immediately respond with its selection and key share. This enables the "0-RTT" (zero round-trip time) feature in specific cases, where clients can send encrypted data even before the handshake is fully complete. These changes make TLS 1.3 approximately 25% faster than TLS 1.2 for connection establishment.
Certificate Verification
During the handshake, the server presents a digital certificate to authenticate its identity. The client verifies this certificate by checking that it was signed by a trusted certificate authority (CA). This verification ensures the client is communicating with the legitimate server and not an imposter. Certificate authorities maintain hierarchies of trust, allowing clients to verify any certificate by tracing it back to a root certificate authority they already trust. Public key cryptography enables this authentication mechanism—the CA's private key signs the certificate, and anyone can verify it with the CA's public key.
Security Implications
The TLS handshake is essential for preventing man-in-the-middle attacks, where an attacker intercepts communications between two parties. By verifying the server's certificate, clients can ensure they're communicating with the genuine server. The key exchange during the handshake establishes a shared secret that only the client and server know, making it impossible for eavesdroppers to decrypt subsequent communications. The handshake also provides forward secrecy in modern implementations, meaning that compromising a server's long-term private key doesn't compromise past sessions encrypted with session-specific keys generated during the handshake.
Related Questions
Why does the TLS handshake take multiple round-trips?
TLS 1.2 requires multiple round-trips because the client and server need to exchange multiple messages to authenticate each other, negotiate security parameters, and establish a shared key. TLS 1.3 optimized this by allowing key exchange information in the initial messages.
What happens if the TLS handshake fails?
If the handshake fails—typically due to certificate verification issues, unsupported cipher suites, or version mismatches—the connection is not established. The browser displays a security warning, and no data is transmitted. This protection prevents insecure connections.
How long does a TLS handshake take?
A typical TLS 1.2 handshake takes 100-300 milliseconds depending on network latency and server response time. TLS 1.3 reduces this to 50-150 milliseconds. For subsequent connections, session resumption can reduce handshake overhead significantly.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
Missing an answer?
Suggest a question and we'll generate an answer for it.