This site explains how digital privacy tools work — encryption, tracking, and identity protection. It is not legal or cybersecurity advice. What this is.

VPN Protocol Handshake: Cipher Suite Negotiation

Every encrypted VPN tunnel begins with a negotiation phase that takes place before a single byte of user data moves across the network. That phase — the handshake — is where the client and server agree on which cryptographic algorithms will govern the session. The result of that agreement is called a cipher suite: a named combination of a key exchange method, an authentication algorithm, a symmetric encryption cipher, and a message authentication code (MAC).

This piece covers the mechanics of that negotiation: how the two endpoints propose, filter, and confirm a shared set of algorithms, and how the outcome shapes the security properties of the encrypted traffic flowing through the tunnel for the remainder of the session.

Take Back Control of Your Windows PC and Its Privacy

Copy-paste command-line guides to switch off Windows tracking, see which apps are talking to the internet, and automate PC upkeep. For Windows 10 and 11.

Learn more

How the Cipher Suite Negotiation Unfolds, Step by Step

The handshake process begins when a VPN client initiates a connection to a VPN server. The client opens by sending a ClientHello message (in TLS-based protocols) or an equivalent initiation message (in IKEv2 or WireGuard). That message contains a list of cipher suites the client supports, ordered by preference from strongest to weakest. Each entry in the list is a structured identifier that encodes the entire algorithm combination — for example, a suite might specify ECDHE for key exchange, RSA for authentication, AES-256-GCM for symmetric encryption, and SHA-384 for message integrity.

The server receives this list and compares it against its own configured list of acceptable suites. It selects the first entry from the client's list that also appears on its own list. The server then replies with a ServerHello message naming that single chosen suite. From this point forward, both sides are committed to those algorithms for the session.

Following suite selection, the handshake moves into the key exchange phase. If the negotiated suite uses Elliptic Curve Diffie-Hellman Ephemeral (ECDHE), each side generates a temporary key pair. The public halves are exchanged; each side independently computes the same shared secret using its own private key and the other party's public key. Neither the shared secret nor either private key ever crosses the wire. This is the mechanism behind forward secrecy: a different ephemeral key pair is generated for each session, so compromise of a long-term private key does not expose past session traffic.

Simultaneously, the server presents a certificate, which the client validates as part of authenticating the server's identity. The authentication algorithm named in the cipher suite — typically RSA or ECDSA — governs how that certificate signature is verified. Once the key exchange completes and authentication succeeds, both sides derive a set of session keys from the shared secret using a key derivation function (KDF). The symmetric cipher named in the suite (such as AES-256-GCM or ChaCha20-Poly1305) then takes over for the bulk encryption of all subsequent data.

In IKEv2, the equivalent process is split into two exchanges. The first (IKE_SA_INIT) negotiates the algorithms and performs the Diffie-Hellman exchange. The second (IKE_AUTH) authenticates the endpoints using the agreed method. The outcome is functionally the same: a shared set of session keys derived from an ephemeral exchange, governed by the negotiated suite.

Technical Components Involved in the Negotiation

The VPN client software maintains a compiled list of supported cipher suites, ordered by internal preference policy. It constructs and transmits the initiation message and parses the server's response to confirm the chosen suite.

The VPN server holds its own configured list of acceptable suites, which an operator may restrict to exclude older or weaker algorithms. It selects from the intersection of the two lists and signals the choice back to the client.

The key exchange algorithm (most commonly ECDHE in modern deployments) handles the generation of ephemeral key pairs and the computation of the shared secret. It operates entirely within the handshake phase and produces no material that persists after the session ends.

The authentication algorithm (RSA or ECDSA) verifies the digital signature on the server's certificate. Its role in the cipher suite is distinct from its role in the certificate chain itself; the suite specifies which algorithm is used to sign handshake messages, not which algorithm was used to sign the certificate.

The symmetric cipher (AES-GCM, ChaCha20-Poly1305, or similar) is the algorithm that encrypts the actual data payload once the tunnel is established. It uses the session keys derived from the key exchange, not the long-term keys used during authentication.

The MAC or AEAD construction provides integrity checking. In authenticated encryption schemes like AES-256-GCM, the authentication tag is built into the cipher mode itself, so a separate MAC algorithm is not listed independently.

The TLS record layer or IKEv2 state machine coordinates the sequencing of messages and enforces that neither side sends application data until the handshake has completed successfully and both sides have confirmed receipt of the final handshake messages.

Where Cipher Suite Negotiation Produces Unexpected Results

Downgrade to a weaker suite. If a server's configured list includes both modern and legacy suites, and a client lists a weak suite higher in its preference order than a strong one, the server may select the weaker option. The handshake completes without error; neither party signals that a stronger option was available. The resulting tunnel uses the weaker cipher for the entire session.

Negotiation failure as a silent connectivity drop. When the client's list and the server's list share no common entry, the handshake fails with an alert and no tunnel is established. From the user's perspective this may be indistinguishable from a network outage. The reason — an algorithm mismatch — is not surfaced to end users by default. This is one scenario where the behavior of a VPN kill switch becomes relevant: traffic may be blocked at the OS level not because the tunnel dropped mid-session, but because it never established.

Forward secrecy is absent when static keys are used. Some older protocol configurations use RSA for key exchange rather than ECDHE. In that case the shared secret is encrypted with the server's long-term public key and transmitted directly. If the server's private key is later compromised, an adversary who recorded the original handshake can retroactively decrypt the session. The cipher suite identifier makes this visible in protocol logs, but only to an observer examining those logs.

Certificate algorithm mismatch. The authentication algorithm in the cipher suite must be compatible with the key type in the server's certificate. A suite specifying ECDSA authentication cannot be used with an RSA certificate. If a server presents an RSA certificate but its configured suite list excludes RSA authentication, the handshake fails even if the cipher and key exchange components are mutually supported.

Algorithm deprecation lag. Cipher suites referencing MD5 or SHA-1 for MAC functions, or 3DES for symmetric encryption, remain listed in some older server configurations. Modern clients may still offer these suites for backward compatibility while preferring stronger options. If a server selects one of these deprecated suites, the tunnel operates with a cipher that the broader cryptographic community considers inadequate, with no warning to the user.

What Protocol Standards and Audits Reveal About Suite Selection

The National Institute of Standards and Technology (NIST) publishes guidance on acceptable algorithm choices in SP 800-52, which covers TLS implementation for federal systems. That document specifies minimum requirements for key exchange (ECDHE with approved curves), authentication (RSA with keys of at least 2048 bits, or ECDSA with P-256 or stronger), and symmetric encryption (AES with 128-bit keys at minimum). It explicitly deprecates suites using RC4, 3DES, and NULL cipher modes.

CISA's guidance on encrypted protocol configuration similarly identifies cipher suite selection as a concrete, auditable control. A protocol configuration audit can enumerate exactly which suites a server will accept, rank them by cryptographic strength, and flag any that fall below current standards. This is a binary, reproducible test: either a deprecated suite is present in the server's list or it is not.

What an audit of cipher suite configuration does not show is how those suites perform under implementation flaws. A correctly negotiated AES-256-GCM session still depends on a correctly implemented random number generator to produce the initialization vector (IV). If the IV is reused — a known implementation error — the cipher's confidentiality properties break down regardless of the suite's nominal strength. Cipher suite audits test configuration, not implementation correctness.

Audits also do not test the policy governing which suites are offered. A server may pass a cipher suite audit by excluding deprecated algorithms while still offering several suites of varying strength. The negotiation will select the strongest suite a given client supports, but clients with constrained configurations may consistently negotiate a weaker option. The audit result reflects the server's ceiling, not the floor that any particular client will reach.

The cipher suite negotiation is a compact, automated process that runs in milliseconds, but its outcome determines the cryptographic character of the entire session that follows. The algorithms named in the negotiated suite govern key derivation, bulk encryption, and integrity verification — making the handshake phase the point at which the security properties of a VPN tunnel are effectively set.

Sources

Note: This explains how digital privacy and security tools work technically. It is not legal or cybersecurity advice, and it is not a substitute for a reader's own judgment about a real security concern. Check the cited sources for current guidance.

5 desks. How it works, not what to do.

Start from the top