[Certificate Fundamentals Part 7] How TLS Works: The TLS 1.3 Handshake, Cipher Suites, SNI/ECH, mTLS, and PQC

Certificate Fundamentals Part 7 How TLS Works: The TLS 1.3 Handshake, Cipher Suites, SNI/ECH, mTLS, and PQC Certificates and PKI

“I narrowed ssl_ciphers in nginx, but the TLS 1.3 cipher suites don’t change.”
“After switching to a newer browser, I can’t reach a site behind an old proxy.”

TLS has changed a great deal in the past few years: TLS 1.3 arrived, old methods were banned, SNI can now be encrypted (ECH), and post-quantum cryptography (PQC) has been introduced. If you don’t know that the mechanism has changed, you cannot find the causes of “I changed the setting but nothing happened” or “it suddenly stopped connecting.”

Through Part 6, we looked at what is inside a certificate and how it is issued. Part 7 looks at how that certificate is actually used in communication, that is, how TLS works.


From SSL to TLS 1.3

VersionPublishedSpecificationStatus today
SSL 2.01995Netscape’s specificationProhibited (RFC 6176, 2011)
SSL 3.01996RFC 6101 (historical record)Prohibited (RFC 7568, 2015). POODLE
TLS 1.01999RFC 2246Prohibited (RFC 8996, 2021)
TLS 1.12006RFC 4346Prohibited (RFC 8996, 2021)
TLS 1.22008RFC 5246Allowed. Limited to ECDHE and AEAD
TLS 1.32018Standardized in RFC 8446, revised as RFC 9846 in July 2026Recommended. New protocols must require TLS 1.3 (RFC 9852)

RFC 8996 says “MUST NOT (must not be used),” not “deprecated.” RFC 9846 also treats the TLS 1.2 specification (RFC 5246) and others as obsolete, and carries over the requirements for TLS 1.2 implementations. Use of TLS 1.2 has not been prohibited. In this article we treat TLS 1.3 as RFC 9846.


Why the old methods stopped working

The history of SSL and TLS is a history of plugging weaknesses as they were found.

Timeline from SSL 2.0 in 1995 to TLS 1.3 in 2018, showing when each version appeared, the BEAST and POODLE attacks, the prohibition of SSL 3.0, RC4, and TLS 1.0/1.1, and the 2026 prohibition of RSA key exchange and DHE in TLS 1.2
  • SSL 3.0: Dealt a fatal blow by the POODLE attack (2014), which exploits weak padding checks to recover plaintext
  • TLS 1.0: Hit by the BEAST attack (2011), which exploits a weakness in CBC mode
  • TLS 1.0 and 1.1: They could not use authenticated encryption (AEAD) and depended on SHA-1, so RFC 8996 prohibited them in 2021. Among ciphers, RC4 was also prohibited in 2015
  • RFC 10015 in July 2026: Even in TLS 1.2, RSA key exchange and finite-field DH (DHE) key exchange are now prohibited. RSA key exchange has no forward secrecy (Part 2): if the server’s private key leaks later, all the past traffic that was recorded can be decrypted

As a result, what you may use in TLS 1.2 is now almost limited to the combination of ECDHE and AEAD, which matches the approach of TLS 1.3. What you use today is TLS 1.3, and TLS 1.2 (ECDHE + AEAD).


The TLS 1.3 handshake

In TLS 1.3, the handshake finishes in one round trip (1-RTT).

Diagram of the one-round-trip handshake: the client sends a ClientHello containing key_share (X25519MLKEM768), SNI, and ALPN; encryption starts once the server returns a ServerHello (key_share); the server sends EncryptedExtensions, Certificate, CertificateVerify, and Finished encrypted; and application data follows the client's Finished
  1. In the ClientHello, the client sends the cipher suites and signature algorithms it supports and the name of the destination (SNI), and sends the key exchange material (key_share) right away. It guesses which method is likely to be chosen and includes it
  2. In the ServerHello, the server chooses a method and returns its own key_share. At this point both sides can compute the same secret, and everything from here on is encrypted
  3. Next the server sends the certificate (Certificate), a signature made with its private key (CertificateVerify), Finished, and so on, all encrypted
  4. The client verifies the certificate (Part 5), returns Finished, and starts sending data

The certificate also arrives encrypted, so devices along the path cannot see its contents. If the guess is wrong, the server specifies the method with a HelloRetryRequest and one more round trip is added. Because the key material goes in the very first message, encryption can begin from the second.

The role of each message

MessageDirectionEncryptedRole
ClientHelloC→SNoSupported versions, cipher suites, groups, and signature algorithms; key_share, SNI, ALPN
ServerHelloS→CNoThe chosen cipher suite and group, and the server’s key_share
EncryptedExtensionsS→CYesExtensions that may be encrypted, such as the ALPN result
CertificateRequestS→CYesAsks for a client certificate (only for mTLS)
CertificateS→CYesThe server certificate and intermediate certificates
CertificateVerifyS→CYesA signature over the exchange so far. Proof that the sender holds the certificate’s private key
FinishedBothYesA MAC over the whole exchange. Confirms nothing was tampered with along the way
NewSessionTicketS→CYesA ticket for resuming next time

In TLS 1.3, the certificate’s private key is not used for key exchange. It is used only for the signature in CertificateVerify, which shows that “the owner of this certificate is the one taking part in this exchange right now.” Because the key exchange uses throwaway ECDHE every time, past traffic cannot be decrypted even if the certificate’s private key leaks later (forward secrecy).


Differences from TLS 1.2 (ECDHE)

Side-by-side comparison: TLS 1.2 (ECDHE) takes two round trips from ClientHello to Finished before encryption starts and sends the certificate in plaintext, while TLS 1.3 takes one round trip and encrypts the certificate after the ServerHello

The TLS 1.2 handshake with ECDHE takes two round trips. There are three differences from TLS 1.3.

  1. The key exchange material is sent in the second round trip, so it is slower
  2. The certificate travels in plaintext. Even for the same certificate, devices along the path can see its contents in 1.2
  3. Old methods can still be chosen

The familiar diagram that shows “the premaster secret is encrypted with the server’s public key and sent” is a diagram of RSA key exchange. It was removed in TLS 1.3 because it has no forward secrecy, and RFC 10015 prohibited it in TLS 1.2 as well. If you keep TLS 1.2, allow only ECDHE and AEAD cipher suites.


How to read a cipher suite (1.2 and 1.3)

ItemTLS 1.2TLS 1.3
Example (IANA name)TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256TLS_AES_128_GCM_SHA256
Example (OpenSSL name)ECDHE-RSA-AES128-GCM-SHA256TLS_AES_128_GCM_SHA256 (the same)
What the name representsKey exchange (ECDHE), authentication (RSA), cipher (AES-128-GCM), and hashOnly the cipher (AEAD) and hash
How key exchange is decidedBy the cipher suiteBy the supported_groups and key_share extensions (X25519MLKEM768, etc.)
How the signature is decidedCipher suite + signature_algorithmsThe signature_algorithms extension
Number of suitesHundreds (including old ones)5 (3 are mainly used)
Settings in OpenSSL and nginx-cipher, ssl_ciphers-ciphersuites, ssl_conf_command Ciphersuites

The three mainly used in TLS 1.3 are AES-128-GCM, AES-256-GCM, and ChaCha20-Poly1305.

Here is the answer to “I narrowed ssl_ciphers but nothing changed” from the beginning. nginx’s ssl_ciphers is a setting for TLS 1.2 and earlier, and it does not change the TLS 1.3 cipher suites. For TLS 1.3, use ssl_conf_command Ciphersuites. On Windows, Get-TlsCipherSuite shows the enabled cipher suites and their order.


SNI, ALPN, and ECH

  • SNI (Server Name Indication): An extension that tells the server, in the ClientHello, which name you want to connect to. A server hosting multiple sites looks at the SNI to choose which certificate to return
  • ALPN: An extension that decides whether to use HTTP/2 (h2) or HTTP/1.1
Diagram showing that without ECH, the ClientHello's SNI (shop.example.com) is visible in plaintext to devices along the path and is used for routing and logging, while with ECH, the real ClientHello is encrypted with a public key obtained from a DNS HTTPS record and only a shared name, public.example.net, is shown on the outside

However, SNI is plaintext, so devices along the path can see where you are connecting. ECH (Encrypted Client Hello, RFC 9849, March 2026) hides it.

  • The client gets ECH’s public key from the DNS HTTPS record (Part 6 of the earlier series DNS Fundamentals), encrypts the real ClientHello, and shows only a shared name on the outside
  • It is enabled by default from Chrome 117 and Firefox 119

Note that internal proxies and firewalls that route or monitor by SNI can no longer identify ECH traffic.

TLS is used for more than the web. DoT (DNS over TLS, TCP 853) and DoH (DNS over HTTPS), which encrypt DNS queries, also run on top of the TLS covered in this article. The differences between them, and the operational impact such as bypassing the internal DNS, are explained in Part 9 of the earlier series DNS Fundamentals.


Session resumption and 0-RTT

A full handshake takes time, so for a server you have connected to before, the client reconnects with a shorter procedure using the results of the previous connection.

Diagram showing that the first connection is a full handshake that receives a NewSessionTicket, that resumption uses the ticket (PSK) to shorten the exchange without a certificate, and that 0-RTT also sends early data in the very first message, but a replay in which an attacker records and resends it can make the same order be processed twice
  • TLS 1.2 uses session IDs and session tickets. TLS 1.3 uses a ticket (PSK, pre-shared key) delivered in NewSessionTicket. In TLS 1.3, combining the PSK with a new ECDHE also preserves forward secrecy
  • Pay attention to the server-side key that encrypts the tickets (the ticket key). If it goes unchanged for a long time and leaks, many sessions can be decrypted, so rotate it regularly

TLS 1.3 also has 0-RTT (early data), which sends the first data together with the ClientHello on resumption. In exchange for speed, it cannot prevent replay attacks that resend recorded early data, so the same “order” might be processed twice. Many servers have 0-RTT disabled by default, and if you use it, limit it to operations with no side effects. When in doubt, leave it disabled.


Client certificates (mTLS)

The method in which the server sends a CertificateRequest and the client also returns a certificate and a signature (CertificateVerify) so that both sides authenticate each other is called mutual TLS (mTLS, client certificate authentication).

Diagram showing that a private CA issues and distributes client certificates, the server asks for a certificate with CertificateRequest, the client also returns its certificate and CertificateVerify, and the server verifies against the private CA's root and lets through only devices that hold the key
  • Unlike ordinary TLS, only devices that hold the private key can connect, so a stolen password is useless
  • It is used for 802.1X (EAP-TLS), VPNs, API traffic between services, and so on, and the certificates are basically issued by a private CA (Part 9)
  • Certificates from public CAs used to include the client authentication purpose (the clientAuth EKU), but because of a change in Chrome Root Program requirements, Let’s Encrypt removed it in February 2026. Review any setup that has been reusing it
  • TLS 1.3 does not allow RSA PKCS#1 v1.5 signatures, but for old smart cards and similar devices, RFC 9963 in April 2026 made an exception for client certificates only

It helps to think of it as doing the same checks as for a server certificate, once more in the opposite direction.


PQC hybrid key exchange (X25519MLKEM768)

This is what can cause the second problem from the beginning, “can’t reach a site behind an old proxy with a newer browser.”

Diagram showing that the session key is made by mixing two secrets, from conventional X25519 and from ML-KEM-768 in FIPS 203, so it stays safe even if one is broken, and that the ClientHello key_share grows from 32 bytes for X25519 to about 1,216 bytes for X25519MLKEM768, no longer fitting in one packet and sometimes failing on old devices

Once quantum computers become practical, ECDHE and RSA may be broken. To guard against “Harvest Now, Decrypt Later” attacks, in which today’s traffic is recorded and decrypted in the future, the migration is under way, starting with key exchange (Part 2).

  • What is used is X25519MLKEM768 (RFC 10024, August 2026), which combines conventional X25519 with ML-KEM-768 from FIPS 203. Because the key is made by mixing both, it stays safe even if one is broken
  • Chrome 131, Firefox 132, iOS and macOS 26, and OpenSSL 3.5 offer it by default. Windows’ Schannel also added support in 2026, but it is disabled by default
  • The caution is that key_share grows by about 1.2 KB, so the ClientHello no longer fits in one packet. Old devices and middleboxes that cannot handle this fail to connect

Only the key exchange has changed. Certificate signatures are still ECDSA or RSA.


Recommended settings (RFC 9325 and Mozilla’s configurations)

ItemModernIntermediate (general recommendation)
TLS versions1.3 only1.2, 1.3
TLS 1.3 cipher suitesAES-128-GCM, AES-256-GCM, ChaCha20-Poly1305Same as left
TLS 1.2 cipher suites—Only the six ECDHE + AES-GCM / ChaCha20-Poly1305 suites
Key exchange groupsX25519MLKEM768, X25519, P-256, P-384Same as left
CertificateECDSA (P-256, P-384)ECDSA, or RSA 2048 bits or larger
HSTSmax-age=63072000 (2 years)Same as left
Oldest client assumedChrome 70, Firefox 63, Android 10, Safari 12.1IE 11 (Windows 10), Android 4.4.2, Java 8u161

The Mozilla SSL Configuration Generator (ssl-config.mozilla.org, guideline 6.0) produces example configurations for nginx, Apache, and others to match your server version. When in doubt, choose Intermediate. RFC 9325 (2022) requires TLS 1.2 or later and recommends TLS 1.3, and RFC 9852 (2026) made TLS 1.3 mandatory for new protocols.


Investigating a connection: openssl s_client

$ openssl s_client -connect www.example.com:443 -servername www.example.com </dev/null
(excerpt)
Certificate chain
 0 s:CN=www.example.com
   i:C=JP, O=Example Trust, CN=Example Issuing CA
   a:PKEY: EC, (prime256v1); sigalg: ecdsa-with-SHA256
   v:NotBefore: Jul 29 22:10:08 2026 GMT; NotAfter: Oct 27 22:17:21 2026 GMT
 1 s:C=JP, O=Example Trust, CN=Example Issuing CA
   i:C=JP, O=Example Trust, CN=Example Root CA
Negotiated TLS1.3 group: X25519MLKEM768
Verification: OK
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
    Verify return code: 0 (ok)
  • Always add -servername (SNI). Without it, the default certificate is returned, and you may mistake that for a name mismatch
  • In Certificate chain, 0 is the server certificate and 1 and later are intermediate certificates. Check that each line’s i: (issuer) connects to the s: (subject) of the next number (Part 4). The v: line also shows the validity period
  • Verification: OK means chain verification succeeded against your local trust store. It does not check that the name matches by default, so add -verify_hostname www.example.com. On failure, a number and reason appear, such as 10 (certificate has expired) (Part 10)

Main s_client options

What you want to doOption or commandWhat to look at
Also verify that the name matches-verify_hostname www.example.comVerified peername:. A mismatch shows 62 (hostname mismatch)
Try a specific version-tls1_2 / -tls1_3Whether it connects, and Protocol:
Specify the key exchange group-groups X25519MLKEM768Negotiated TLS1.3 group:
Send ALPN-alpn h2,http/1.1ALPN protocol: h2
See the whole chain that was sent, in PEM-showcertsWhether intermediate certificates are sent
See only a summary-briefProtocol version:, Ciphersuite:
Mail STARTTLS-starttls smtp (imap, pop3, etc.)The mail server’s certificate (Part 9 of Email Fundamentals)
See only the expiration and SANPipe the s_client output to openssl x509 -noout -dates -ext subjectAltNamenotAfter and SAN

When you connect with -tls1_2, the ECDHE key exchange appears as Peer Temp Key: X25519, 253 bits. OpenSSL 3 does not send TLS 1.0/1.1 at its default security level, so -tls1_1 ends with “no protocols available” on your machine and tells you nothing about the server’s settings. To list the versions the server accepts, use something like nmap, shown next.


Investigating with curl and Windows (PowerShell)

$ curl -v -o /dev/null https://www.example.com/        # (excerpt)
* ALPN: curl offers h2,http/1.1
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519MLKEM768 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*   subject: CN=www.example.com
*   expire date: Oct 27 22:17:21 2026 GMT
*   subjectAltName: "www.example.com" matches cert's "www.example.com"
* SSL certificate verified via OpenSSL.
PS> $tcp = [System.Net.Sockets.TcpClient]::new('www.example.com', 443)
PS> $ssl = [System.Net.Security.SslStream]::new($tcp.GetStream())
PS> $ssl.AuthenticateAsClient('www.example.com')     # Throws an exception if validation (including the name) fails
PS> $ssl.SslProtocol                                # Tls13
PS> $ssl.NegotiatedCipherSuite                      # TLS_AES_256_GCM_SHA384 (PowerShell 7)
PS> ([System.Security.Cryptography.X509Certificates.X509Certificate2]$ssl.RemoteCertificate).NotAfter
PS> $ssl.Dispose(); $tcp.Dispose()
  • Test-NetConnection www.example.com -Port 443 checks TCP reachability only. Check TLS and the certificate with the SslStream commands above
  • In PowerShell 7, Invoke-WebRequest https://www.example.com -SslProtocol Tls12 lets you test whether a connection works with a specified version
  • You can get the list of versions and cipher suites a server accepts with nmap --script ssl-enum-ciphers -p 443 www.example.com (use it only on targets you have permission to test)

Think about it

  1. Does a server you manage still accept TLS 1.0/1.1 or cipher suites with RSA key exchange (TLS_RSA_WITH_…)? How would you check?
  2. Do your internal proxies and firewalls control traffic by looking at SNI? What is likely to happen as ECH and large ClientHellos (PQC) spread?
  3. Is there anything that uses client certificates (mTLS)? Which CA issues those certificates, and how do you check revocation?

Hint: Look at “Why the old methods stopped working,” “SNI, ALPN, and ECH,” “Client certificates (mTLS),” and “PQC hybrid key exchange” in this article, along with the commands for checking.


Summary

  • What you use today is TLS 1.3 and TLS 1.2 (ECDHE + AEAD). RSA key exchange was prohibited in 1.2 as well in 2026
  • TLS 1.3 starts encrypting after one round trip, and the certificate is encrypted too. The certificate’s private key is used only for signing
  • TLS 1.3 cipher suites are only AEAD and a hash. nginx’s ssl_ciphers does not change them
  • SNI is plaintext, and ECH encrypts it. It affects internal devices that look at SNI
  • 0-RTT cannot prevent replay. Issue mTLS certificates from a private CA
  • PQC’s X25519MLKEM768 has started to be used by default. A large ClientHello can make old devices fail

Next time, we cover the inventory, automatic renewal with ACME, and expiration monitoring that prevent certificate expiration.


The Certificate Fundamentals series (11 parts)

All 11 parts with a reading guide: Certificate Fundamentals

  1. Why Do We Need Certificates?
  2. Cryptography basics
  3. Trying it with openssl and PowerShell
  4. Inside an X.509 certificate
  5. PKI and how trust works
  6. Certificate types and issuance
  7. How TLS works (this article)
  8. Lifecycle and automation
  9. Private PKI and the cloud
  10. Certificate troubleshooting
  11. Certificate design exercises

This series is the English edition of 【証明書入門】, originally written in Japanese.

コメント

Copied title and URL