Background reading Hybrid TLS

Read ClientHello and ServerHello

In this example, the client offers X25519MLKEM768, and the server selects it. The share lengths below are for the key_exchange values and exclude the surrounding TLS fields.

ClientHello  → ML-KEM encapsulation key (1184 B) || X25519 public share (32 B)
ServerHello  ← ML-KEM ciphertext         (1088 B) || X25519 public share (32 B)
             ← { EncryptedExtensions, Certificate, CertificateVerify, Finished }
             → { Finished }
             ↔ { Application data }

The server encapsulates to the client’s ML-KEM key. The client decapsulates the returned ciphertext. Both parties also compute X25519. Feed the 32-byte ML-KEM shared secret followed by the 32-byte X25519 shared secret into the TLS key schedule, which derives transcript-bound handshake and application traffic secrets.

Read the authentication messages

Certificate supplies the server’s certificate chain in this certificate-authenticated example. CertificateVerify signs a context-bound transcript hash and demonstrates possession of the certificate’s private key. Finished authenticates the preceding transcript using a key derived from the handshake traffic secret. Application traffic keys are derived using the transcript through the server Finished.

Read the captured handshake

This excerpt comes from a loopback handshake with OpenSSL 4.0.3 and an ECDSA P-256 test certificate. The group identifier is 4588 (0x11EC), and the signature identifier is 0x0403.

ClientHello
  NamedGroup: X25519MLKEM768 (4588)
  key_exchange length: 1216
ServerHello
  NamedGroup: X25519MLKEM768 (4588)
  key_exchange length: 1120
EncryptedExtensions
Certificate
CertificateVerify
  Signature Algorithm: ecdsa_secp256r1_sha256 (0x0403)
Finished (server)
Finished (client)
Verification: OK

Locate the fields in a trace

Use OpenSSL s_client with -trace against a local test server. Locate the selected group and mark byte offsets 1184 on the client share and 1088 on the server share, counting from zero. The last 32 bytes in both shares are X25519. If the trace stops after ServerHello, inspect the decoded handshake with local test-session key logging to read the encrypted messages. The negotiated group identifies the key exchange. CertificateVerify identifies the signature scheme. RFC 10024, Section 4 · TLS 1.3.