Skip to content

TLS 1.3: support the hybrid ECDHE-MLKEM key exchange groups - #5319

Open
Ankit-dmc wants to merge 1 commit into
secdev:masterfrom
Ankit-dmc:tls13-ecdhe-mlkem
Open

Ankit-dmc wants to merge 1 commit into
secdev:masterfrom
Ankit-dmc:tls13-ecdhe-mlkem

Conversation

@Ankit-dmc

Copy link
Copy Markdown

Description

Implements the TLS 1.3 hybrid key exchange groups of draft-ietf-tls-ecdhe-mlkem-05: X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024 (0x11ED, added to _tls_post_quantum_hybrid). ML-KEM comes from cryptography >= 47; without it, these groups behave as unsupported.

  • groups.py: TLSHybridKEMPrivateKey (client side) and TLSHybridKEMShare (a received share), with the share and shared secret layouts of sections 4.1 to 4.3.
  • The server share is an encapsulation to the client share, so TLSServerAutomaton computes it once the ClientHello is known, before the ServerHello is built. TLSHybridKEMShare keeps the result, so every build of the ServerHello carries the same share and secret.
  • test_tls_client gets a client_curve argument to select the client's group.

Interoperability was checked against OpenSSL 4.1 for each group, in both directions (TLSClientAutomaton with openssl s_server -groups <group>, and openssl s_client -groups <group> with TLSServerAutomaton).

fixes #5318

This message was written with the help of AI (Claude Opus 5.5).

Implement X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024
(draft-ietf-tls-ecdhe-mlkem-05) for TLS 1.3 key shares, using ML-KEM
from cryptography >= 47. The server share is an encapsulation to the
client share, so TLSServerAutomaton computes it once the ClientHello is
known.

AI-Assisted: yes (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TLS 1.3: support the hybrid ML-KEM key exchange groups (X25519MLKEM768 etc.)

1 participant