What is the TLS key_share extension?

The TLS key_share extension carries the public key exchange values a client and server use to agree a shared key in TLS 1.3, defined in RFC 9846. This page explains where it appears and what it means for post-quantum migration.

On this page

What the TLS key_share extension is and who meets it

The TLS key_share extension is the TLS extension with value 51, in which a client sends public key exchange values for the named groups it chooses, and the server answers with its own value for one selected group. RFC 9846, the current TLS 1.3 specification, defines it, and it appears in ClientHello, ServerHello and HelloRetryRequest messages. Each entry, a KeyShareEntry, pairs a named group with its key_exchange bytes, and the definition of that group determines what those bytes contain. The key_share extension is how a TLS 1.3 handshake establishes shared keying material, which makes it the place where post-quantum and hybrid groups such as X25519MLKEM768 first show up on the wire.

Engineers meet the term when they read handshake captures from a TLS client or server and see a key_share extension carrying one or more entries, often with a group identifier that is unfamiliar. Configuration owners meet it when they set which groups their load balancer, reverse proxy or application server offers, because the client_shares list and the supported_groups list must agree. Security and procurement reviewers meet it in vendor answers asking whether a product supports hybrid key exchange in TLS 1.3. In each case, confirm against the version and build actually deployed: the IANA registries list which groups are assigned and marked recommended, and the release notes of each library say which default key share it offers. The sources listed on this page do not say how any particular product handles key_share in a given release, so check the vendor's documentation or test the handshake directly.

Names, identifiers and related registry entries for key_share

This table lists the names, values, structures and registry entries that practitioners meet when reading key_share in TLS captures and configuration. Note that key_share is an extension, not a named group: it carries the key exchange values for groups, and the group names below are the ones that populate those values. Check the source column when you need to confirm which document defines a name.

Name or identifierWhat it isWhere it appearsSource
key_share (extension)TLS extension, value 51, carrying public key exchange values for chosen named groupsClientHello, ServerHello and HelloRetryRequestRFC 9846; IANA TLS ExtensionType Values
KeyShareEntryStructure pairing a named group with its key_exchange bytes; the group definition determines what those bytes containInside the key_share extensionRFC 8446
client_sharesList in ClientHello in descending order of client preference, matching supported_groups order; may be a non-contiguous subsetClientHello key_shareRFC 8446
Empty client_sharesRequest for the server to select a group, at the cost of an extra round tripClientHello key_shareRFC 8446; RFC 9846
selected_groupSingle group the server chooses when it asks the client to retry with a different shareHelloRetryRequest key_shareRFC 8446
supported_groups (extension, value 10)The extension listing groups a client accepts; key_share values must match groups listed hereClientHello and EncryptedExtensionsIANA TLS ExtensionType Values
X25519MLKEM768 (4588, 0x11EC)Hybrid group combining X25519 with ML-KEM-768; client share is 1216 byteskey_share values in hybrid handshakesRFC 10024; IANA TLS Parameters
SecP256r1MLKEM768 (4587, 0x11EB)Hybrid group combining P-256 with ML-KEM-768key_share values in hybrid handshakesRFC 10024; IANA TLS Parameters
SecP384r1MLKEM1024 (4589, 0x11ED)Hybrid group combining P-384 with ML-KEM-1024; client share is 1665 byteskey_share values in hybrid handshakesRFC 10024; IANA TLS Parameters
MLKEM768 (0x0201, registry value 513)Standalone post-quantum group using ML-KEM-768 without a classical componentkey_share values, where a peer supports itdraft-ietf-tls-mlkem-11; IANA TLS Parameters

Where the key_share extension appears in TLS handshakes

The key_share extension is carried in three handshake messages, and each carries a different amount of information. Reviewers meet it in packet captures, library settings, vendor documents and questionnaire answers, so knowing what each message holds helps you check what a vendor claims.

ClientHello client_shares

The client sends a list of key exchange values, one for each group it offers, in descending order of preference. Each entry must match a group in supported_groups in the same order, and the list may omit the most preferred groups. Clients may also send an empty list to ask the server to select a group, which costs an extra round trip. When checking a capture, compare the entries here with the supported_groups list to confirm they match.

RFC 9846 text

ServerHello server share

The server answers with one key_share entry holding its own public value for the group it chose. The server must not send a share for a group the client did not list in supported_groups, and must not send one when using psk_ke. The group named in this reply is the one both sides use for key exchange, so it is the first thing to check in a handshake log.

RFC 8446 text

HelloRetryRequest selected group

When the client's shares do not suit the server, the server replies with a HelloRetryRequest that names a single selected_group. The client must confirm the group was in its supported_groups and was not already in its key_share, or it aborts with illegal_parameter. The client then replaces its share with one new entry for that group and resends ClientHello. Repeated retries in a capture point to a mismatch in offered groups.

RFC 8446 text

Handshake captures

A packet capture or TLS debug log shows which group names appear in client_shares and which one the server selects. Hybrid groups such as X25519MLKEM768 appear under their registered numeric values, so a capture can show whether a hybrid group was offered or used. Sizes in captures should match the published lengths for the group, for example 1216 bytes for an X25519MLKEM768 client share. Mismatched sizes are a reason to ask questions of the vendor.

RFC 10024 text

TLS library configuration

Library settings decide which groups go into client_shares and in what order. OpenSSL 3.5.0, released on 8 April 2025, changed its default groups so hybrid groups are preferred and X25519MLKEM768 is offered alongside X25519 by default. Other libraries and older versions may use different defaults, so confirm the group list in the configuration you actually run rather than relying on a version name.

OpenSSL 3.5 notes

Vendor documents and audit answers

Vendor questionnaires and tender answers often say a product supports post-quantum key exchange without naming the group or message. Ask which hybrid groups appear in client_shares or ServerHello, and whether HelloRetryRequest is used for them. Compare the answer with the IANA registry entries, where X25519MLKEM768 is marked Recommended Y and SecP384r1MLKEM1024 is marked Recommended N. Treat a claim that does not name a group as incomplete.

IANA TLS Parameters

How key_share establishes the shared key in a TLS 1.3 handshake

The key_share extension is where a TLS 1.3 handshake carries the public key exchange values that both sides need to derive a shared secret. The client sends its values in ClientHello, the server answers with its own in ServerHello, and in some cases a HelloRetryRequest carries the server's choice back to the client. Each value is tied to a named group, and the extension is identified by the IANA TLS ExtensionType registry as value 51. When you read a handshake capture or a vendor's answer about key exchange, the group names in key_share tell you which key exchange was actually used, so this is the field to check when someone asks whether a connection negotiated a post-quantum or hybrid group.

The basic unit is a KeyShareEntry, which pairs a named group with its key_exchange bytes. The group's definition determines what those bytes contain, so the same group name always means the same kind of value. For hybrid groups, the key_exchange field is the concatenation of each component's value in the order defined for the named group, with no added length fields. RFC 10024 gives the sizes for the hybrid groups it defines. For example, the X25519MLKEM768 client share is 1216 bytes, with the ML-KEM-768 encapsulation key first and the X25519 share second. Expect the size of a key_share to grow when a post-quantum group is offered, and confirm the sizes against the RFC or your capture rather than relying on memory.

Two rules limit what a server may send. A server must not send a share for a group the client did not list in supported_groups, and it must not send one when using psk_ke, the pre-shared key mode without key exchange. Clients may send an empty client_shares list to ask the server to select a group, but that costs an extra round trip. If you are reviewing server configuration or tracing a failed handshake, these rules are what to check first: a server that returns a group the client never offered, or that sends a key share in psk_ke mode, is violating RFC 8446. The current TLS 1.3 specification is RFC 9846, which obsoletes RFC 8446, so cite RFC 9846 when you document a requirement and confirm wording against the text itself.

When you plan a post-quantum rollout, check your TLS stack's documented default groups and whether they include hybrid groups such as X25519MLKEM768, since the group list decides what appears in key_share. OpenSSL 3.5.0 documents that its default TLS supported groups now include and prefer hybrid PQC KEM groups, and its default key shares offer X25519MLKEM768 and X25519. Confirm the behavior for the exact version and configuration you run, because client and server defaults can differ and a server that does not support the offered group will send a HelloRetryRequest or fail the handshake.

Where key_share sits in the TLS 1.3 handshake sequence

The client starts the exchange with a ClientHello that carries its key_share entries, one for each group it chooses to offer. The server answers in a ServerHello with its own key_share value for the group it selected. If the server selects a group the client did not send a share for, it returns a HelloRetryRequest naming one selected_group, and the client resends a ClientHello containing a single new key_share entry for that group. Check that the selected group was in your supported_groups and that you did not already send a share for it, because a violation causes the client to abort with an illegal_parameter alert.

Where key_share appears in ClientHello, ServerHello and HelloRetryRequest.

Standardization status of key_share and the post-quantum groups it carries

The key_share extension is defined in RFC 9846, "The Transport Layer Security (TLS) Protocol Version 1.3" by E. Rescorla, a Standards Track document dated July 2026. RFC 9846 obsoletes RFC 8446, the original TLS 1.3 specification published in August 2018 as a Standards Track document. Its key_share value, 51, is recorded in the IANA TLS ExtensionType registry, which cites RFC 9846 and RFC Errata 5483. Engineers reading a handshake or a vendor document should cite RFC 9846 for key_share, and should check that a vendor's claim of TLS 1.3 support refers to a version that implements it. Confirm the current status of both documents on the IETF datatracker before quoting them in an audit response.

The hybrid groups that carry post-quantum key exchange have different standardization status. RFC 10024, "Post-Quantum Traditional (PQ/T) Hybrid Key Agreement Mechanisms for TLS 1.3", is a Standards Track RFC of August 2026 that defines X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. RFC 9954, "Hybrid Key Exchange in TLS 1.3", is an Informational RFC of July 2026 that gives the general construction for combining traditional and post-quantum key exchange. The standalone ML-KEM groups are in draft-ietf-tls-mlkem-11, an Informational Internet-Draft dated 17 September 2026 that is in the RFC Editor queue and may still change. Treat that draft as unfinished when a vendor cites it as settled.

In the IANA TLS Supported Groups registry, the Recommended column marks X25519MLKEM768 as Y and the other post-quantum groups, including SecP256r1MLKEM768, SecP384r1MLKEM1024 and MLKEM768, as N. The registry describes N as not necessarily a flaw, but possibly a lack of IETF consensus or limited applicability, so an N does not mean a group is insecure or unsupported. No group in these documents is required for TLS 1.3 conformance. When a security review asks whether a specific group is standardized, answer with its RFC or draft and its Recommended flag, and confirm with the peer software which groups it negotiates.

What key_share means for a post-quantum TLS migration

Moving a TLS deployment to hybrid post-quantum key exchange means checking what key_share carries, what the clients and servers in your path offer, and whether the handshake still completes when the larger shares and retry paths are used. The steps below put that work in the order it happens, ending with a test-environment handshake that includes HelloRetryRequest.

  1. Find key_share in captures and configuration

    Start by locating where key_share is used in your environment. Capture handshakes from the clients and servers you operate, using a packet capture tool or the TLS debug output of your library, and review the ClientHello and ServerHello messages for extension type 51. In configuration, search for the settings that control key exchange groups and key shares, such as the group lists of your TLS libraries and reverse proxies, and record which components set them. This step is done when you have a written list of every endpoint that sends or receives a key_share, with the configuration file or capture that shows it.

  2. Confirm named groups in client shares and supported groups

    For each endpoint on your list, confirm which named groups appear in the client_shares list and in the supported_groups extension. The client_shares list is ordered by client preference and must match entries in supported_groups in the same order, and it may omit the most preferred groups. Note whether each hybrid group, such as X25519MLKEM768, appears alongside classical groups such as x25519, and whether any client sends an empty client_shares list, which forces an extra round trip. This step is done when you can state, for each endpoint, the groups it offers and the order it offers them in.

  3. Check hybrid share sizes through network devices

    Hybrid key shares are much larger than classical ones. The X25519MLKEM768 client share is 1216 bytes, and the SecP384r1MLKEM1024 client share is 1665 bytes, according to RFC 10024. Ask the owners of firewalls, load balancers, intrusion prevention systems and TLS terminators in your path whether they accept ClientHello messages of this size, whether they reassemble handshake records that span multiple TCP segments, and whether they inspect or rewrite the key_share extension. Test each device with a hybrid ClientHello. This step is done when every device in the path has either passed a hybrid handshake in your test setup or has a documented configuration change or vendor confirmation that it will.

  4. Ask vendors which groups and key_share behaviour they support

    Send each vendor in your path a written request asking which named groups their TLS stack supports, including the hybrid groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024 and the standalone MLKEM768 and MLKEM1024 groups, and how they select a group when the client offers several. Ask whether they send a HelloRetryRequest when no offered share is acceptable, and what version and configuration their answer applies to. The IANA registry marks some of these groups as recommended and others as not recommended, so ask vendors to state their position against that registry. This step is done when you hold a dated written answer from each vendor that names the versions it covers, and you have marked any group they do not support.

  5. Test a handshake that includes HelloRetryRequest

    In a test environment that mirrors production, run handshakes between your clients and servers with the hybrid groups enabled. Include a case where the client's first key_share is for a group the server does not select, so that the server answers with a HelloRetryRequest naming one selected_group and the client resends its ClientHello with a single new key_share entry for that group. Confirm the handshake completes in each case, and confirm the client rejects the HelloRetryRequest if the selected group was not in its supported_groups or was already present in its key_share. This step is done when the test log shows completed handshakes with and without HelloRetryRequest, and any illegal_parameter alerts you see are traced to a configuration you can explain.

  6. Record results and confirm the group selection behaviour

    Gather the captures, configuration lists, vendor answers and test logs from the earlier steps into one record for each endpoint. For each endpoint, state the groups it offers, the groups it selects, whether a HelloRetryRequest was observed, and the version of the software that produced the result. Check that the record confirms the rule that a server must not send a share for a group the client did not list in supported_groups. Where a result depends on a specific library or version, name that version, since behaviour can differ between releases and the sources in this section do not establish compatibility across them. This step is done when a reviewer can trace each claim about key_share behaviour to a capture, a configuration line, a vendor answer or a test log.

Common confusions about key_share and what it does not do

The key_share extension is easy to mistake for other TLS mechanisms that look similar in captures and configuration. The cards below separate it from supported_groups, explain what its extension value means, and set out what sending a key_share does and does not prove about a connection.

Not the same as supported_groups

The supported_groups extension lists the named groups a client is willing to use, while key_share carries public key exchange values for a subset of those groups. Each entry in client_shares must match a group in supported_groups, and the client may omit the most preferred groups from key_share. When you review a capture or configuration, check both extensions separately, because a group can appear in one without appearing in the other.

RFC 8446 text

Value 51 is an extension, not a group

The IANA TLS ExtensionType registry assigns key_share the value 51, and that number identifies the extension itself. It does not identify a key exchange group. Group identifiers are separate values, such as 29 for x25519 or 4588 for X25519MLKEM768 in the Supported Groups registry. Confusing the two registries can lead to misreading which algorithm a connection actually negotiated.

IANA ExtensionType values

A key_share is not proof of post-quantum

A client sending a key_share shows only that it offered public key exchange values for some named groups. Whether the connection is post-quantum depends on which group was actually used. A hybrid group such as X25519MLKEM768 combines a traditional and a post-quantum component, while x25519 alone does not. Check the negotiated group in the handshake or the server's configuration rather than inferring it from the presence of the extension.

RFC 10024 text

KeyShare values are not reused across connections

Section 1.2 of RFC 9846 forbids reusing KeyShare values between connections. Each handshake needs its own key exchange values. This matters when you review a client or server that caches or pre-generates shares, because reuse across connections would fall outside the rules. Confirm the behavior in the vendor's documentation or by testing, since the rule is stated in the specification and not always enforced in product configuration.

RFC 9846 text

The NSA advisory does not mandate key_share

The NSA's advisory and CNSA 2.0 set expectations for national security systems, and they do not make key_share mandatory for commercial systems. A commercial organization may use them as a reference, and may meet specific requirements through a contract with a federal customer. Read any requirement you face against the document that imposes it, and confirm with the customer or your counsel before treating a configuration choice as a compliance obligation.

RFC 9954 text

Questions people search about the TLS key_share extension

What does key_share stand for and what is its value?

key_share is the name of a TLS extension with the extension type value 51, as listed in the IANA TLS ExtensionType registry. The name describes its job: the client sends its public key exchange values, called key shares, for one or more named groups, and the server replies with its own value for the group it selects. The extension appears in the ClientHello, the ServerHello and the HelloRetryRequest. RFC 9846, the current TLS 1.3 specification, defines it. Each key share is a KeyShareEntry that pairs a named group with the bytes for that group's key exchange, so the group's definition determines what those bytes contain.

Is key_share the same as supported_groups?

No. supported_groups is the list of named groups a client is willing to use, and the IANA registry gives it extension value 10. key_share carries the actual key exchange values for some of those groups. The two must agree: each entry in the client_shares list must match a group in supported_groups, and the list is ordered by client preference. The client may leave out the most preferred groups, so key_share can be a subset of what supported_groups advertises. A server must not send a share for a group the client did not list in supported_groups. When reviewing a handshake capture, check both extensions together to see which groups were offered and which were actually sent.

Is key_share standardized, and which RFC defines it?

Yes. key_share is standardized in the IETF TLS working group's specifications. RFC 9846, "The Transport Layer Security (TLS) Protocol Version 1.3" by E. Rescorla, is a Standards Track document dated July 2026 that obsoletes RFC 8446, the original TLS 1.3 specification published in August 2018. RFC 9846 also updates the IANA registry entry for key_share, which cites RFC 9846 and RFC Errata 5483. The extension's behavior for hybrid groups is covered by RFC 9954, "Hybrid Key Exchange in TLS 1.3", an Informational document from July 2026, and by RFC 10024, a Standards Track document from August 2026 that defines the hybrid groups X25519MLKEM768, SecP256r1MLKEM768 and SecP384r1MLKEM1024. Confirm the exact RFC your vendor cites, since older products may follow RFC 8446.

Does OpenSSL 3.5.0 offer X25519MLKEM768 in key_share by default?

According to the OpenSSL 3.5 release notes, yes. OpenSSL 3.5.0 was released on 8 April 2025, and its notes say the default TLS supported groups list now includes and prefers hybrid PQC KEM groups, and that the default TLS keyshares offer X25519MLKEM768 and X25519. The release notes are the source for this default, so check them against the exact build you run. Distributions and vendors may compile or configure OpenSSL differently, so confirm the default in your own environment by inspecting the client's ClientHello in a capture or by checking the configuration in use. Do not assume the library default applies to products that embed OpenSSL.

What changes in key_share during a post-quantum migration?

The main change is that the key_share entries grow, because hybrid groups carry a post-quantum key component alongside a classical one. RFC 10024 lists the client share for X25519MLKEM768 as 1216 bytes, with the ML-KEM-768 encapsulation key of 1184 bytes first and the X25519 share of 32 bytes second, and the SecP384r1MLKEM1024 client share as 1665 bytes. Larger ClientHello messages can affect middleboxes, load balancers and fixed-size buffers, so test them. Clients that offer several hybrid groups with the same ML-KEM-768 component send that public key more than once, as RFC 9954 notes. Plan testing of handshake size, retry behavior and interoperability with your own servers and inspection devices before changing configuration.

What should I ask a vendor about key_share support?

Ask which TLS version and RFC the product follows, and whether it implements key_share as defined in RFC 9846. Ask which named groups it offers by default in key_share and in supported_groups, and whether X25519MLKEM768 is included. Ask how it behaves when a client offers only groups it does not support, specifically whether it sends a HelloRetryRequest with a selected_group and how it handles the empty client_shares case that costs an extra round trip. Ask for a handshake capture or test results showing the key_share and supported_groups values in use, and for the version and build the answer applies to. Ask whether the product has been tested with the larger key_share sizes that hybrid groups produce, and what it does when an intermediary blocks or resizes them.

Can I confirm key_share behavior myself without a vendor?

Yes. Capture a TLS handshake between a client and your server with a packet analyzer or a TLS testing tool, then read the key_share and supported_groups extensions in the ClientHello and ServerHello. Check whether key_share contains a hybrid group such as X25519MLKEM768, whether the client shares match entries in supported_groups, and whether a HelloRetryRequest appears with a selected_group. Compare what you see against the RFC that the product claims to follow. The sizes you observe should agree with the byte counts RFC 10024 gives for each hybrid group. Record the software versions alongside each capture so the results can be repeated later.

How DeployOpen works on this

DeployOpen works on key_share as part of a wider TLS migration: we scope which clients and servers negotiate which named groups, build and configure the components that terminate TLS, test the handshakes against the real traffic, and document what changed. Engagements are fixed-scope, with the scope agreed in writing before work starts.

How we scope

  • We list the TLS endpoints and clients that send or accept key_share values in your environment.
  • We record which named groups each component offers today, including classical groups like x25519.
  • The written scope states which hybrid groups, such as X25519MLKEM768, are in and out of the work.

How we build

  • We configure supported_groups and key_share ordering on the servers and load balancers you run.
  • We check that clients sending multiple key_share entries still complete handshakes after the change.
  • We test HelloRetryRequest behavior, since a server may ask the client to resend a key_share for one group.

How we hand over

  • You receive captures and handshake logs showing which key_share entries each endpoint sent and accepted.
  • The documentation records each configuration change, the component version, and the rollback steps.
  • We walk your security and platform engineers through the results so they can review them independently.

How we support

  • Ongoing support is available as a retainer for upgrades when libraries like OpenSSL change default groups.
  • Continuous testing can re-check key_share negotiation after each release of your TLS terminators.
  • Ask any reviewer to confirm compatibility for the exact library and version you run before relying on it.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.