Can you enable post-quantum key exchange in curl today?
Yes, with conditions. curl has no dedicated post-quantum switch in the sources reviewed. Hybrid key exchange groups such as X25519MLKEM768 are selected through the --curves option, which sets the TLS key exchange groups, and that works only when the underlying TLS library supports the group. curl 8.21.0, released June 24, 2026, lists a fix titled "tls: wolfssl: fixes for PQC key shares", and it changed the wolfSSL backend so that --curves is applied through wolfSSL's group list. curl's own documentation does not say whether post-quantum key exchange is on by default, and it gives no minimum curl version for it. The sources also do not confirm which curl release first offers working support on every TLS backend, so treat the version number as something to verify in your own build.
To try it, run curl -v --curves X25519MLKEM768 against a server you control, then look for X25519MLKEM768 in the verbose TLS output. curl's everything.curl.dev page gives this exact check, and it is the test to run before changing any production setting. Confirm first which TLS library your curl binary uses, because the curl -V output names it and the group behavior differs by backend. Options such as --curves are documented as working with specific backends only in the libcurl reference for CURLOPT_SSL_EC_CURVES`, which lists OpenSSL and wolfSSL, so check that page against your build before assuming a group name will be honored.
Before you rely on this, plan for failure. The curl documentation warns that larger post-quantum handshake data may be blocked by older middleboxes and firewalls, so a connection that works with a classical group may fail or fall back when a hybrid group is offered. wolfSSL's April 30, 2026 post says that wolfSSL needs specific build flags for these groups, that they work only in TLS 1.3, and that the server must also support them. Test against each server your clients reach, record the negotiated group, and keep a fallback path in your change plan.
Which curl settings and versions apply to hybrid key exchange
This table compares the curl version, option and TLS backend combinations that the checked sources describe for hybrid key exchange, with the status of each. Read each row against the backend you actually build curl with, because the sources tie support to specific libraries and releases. Where a source is silent, the row says so and names what to confirm.
| Setting or release | What the sources say | What to confirm |
|---|---|---|
| --curves option (curl 7.73.0) | Sets the TLS key exchange groups, for example X25519:P-521. When set, it ignores the TLS library's default list. | Confirm the library's own default group list in your build, since curl no longer supplies one when --curves is set. |
| X25519MLKEM768 example | curl's post-quantum page shows curl -v --curves X25519MLKEM768 and says to look for X25519MLKEM768 in the verbose TLS line. | Confirm the group name appears in your build's verbose output, because the page gives no minimum curl version. |
| 8.21.0 wolfSSL PQC key share fix (June 24, 2026) | The changelog lists the bugfix 'tls: wolfssl: fixes for PQC key shares'. The related pull request says the wolfSSL ML-KEM code path was never enabled because WOLFSSL_HAVE_KYBER is no longer in upstream wolfSSL. | Builds using wolfSSL before 8.21.0 should be checked for whether ML-KEM key shares were sent at all. |
| PR 22030, wolfSSL and --curves | Changes the wolfSSL backend to apply --curves through wolfSSL_CTX_set1_groups_list() and removes its default QUIC group setting. | Confirm the curl release that includes this change in your version history, since the sources do not tie it to a release number here. |
| CURLOPT_SSL_EC_CURVES backends | Works only with the OpenSSL and wolfSSL backends. Its page does not mention post-quantum groups. | Confirm whether your application sets this option, since it is not the documented route for post-quantum groups. |
| wolfSSL build requirements (April 30, 2026 post) | Needs wolfSSL built with --enable-curl, --enable-mlkem and --enable-mldsa. Groups work in TLS 1.3 only. ML-DSA support needs the server's leaf certificate to hold an ML-DSA key. | Confirm the wolfSSL build flags and that the server is negotiating TLS 1.3 before expecting a hybrid group. |
| Newest curl release | The changelog lists 8.23.0, dated October 14, 2026, as the newest release, checked on 2026-12-03. | Recheck the changelog for releases after that date before relying on this table. |
| OpenSSL backend | The sources list OpenSSL as supporting CURLOPT_SSL_EC_CURVES, but they do not name an OpenSSL version or post-quantum group for it. | Confirm the OpenSSL version and the group names your build accepts with your own test. |
| Default enablement and minimum version | The curl post-quantum page does not say whether hybrid groups are on by default and gives no minimum curl version. | Confirm default behavior in your own build and do not assume it from the release notes alone. |
Steps to turn on hybrid key exchange and confirm it
This sequence moves curl from its current TLS library to one that supports the X25519MLKEM768 hybrid key exchange group, then confirms the group is negotiated on a live TLS 1.3 connection. Each step ends with a check that shows whether the change took effect, and the last step repeats the test against endpoints that resemble production.
Confirm curl and TLS library versions
Run curl --version to read the curl release and the TLS backend it was built with. The curl changelog lists 8.23.0, dated October 14, 2026, as the newest release, and the curl 8.21.0 changelog of June 24, 2026 includes a fix for PQC key shares in the wolfSSL backend. Confirm that your curl is at least 8.21.0 and that the backend is wolfSSL or another build that exposes the group. The step closes when the version output shows both the curl release and wolfSSL as the SSL library. If the build uses OpenSSL, GnuTLS, mbedTLS, Schannel or rustls, confirm with the vendor or your build documentation whether that backend accepts X25519MLKEM768, because the sources checked here cover only the wolfSSL path.
Build wolfSSL with the required options
Build or install wolfSSL with the options wolfSSL's April 30, 2026 post describes for a curl build: --enable-curl, --enable-mlkem and --enable-mldsa. Then build curl against that wolfSSL installation. The --enable-mldsa flag matters for server certificates: wolfSSL's post says ML-DSA support means the server's leaf certificate has an ML-DSA key, so this flag does not change the key exchange by itself. The step closes when the build finishes without errors and curl --version reports wolfSSL as the backend. Check the wolfSSL and curl build logs for the feature flags to confirm the options were applied, since a silent omission would leave the group unavailable.
Run curl against a test endpoint
Run curl -v --curves X25519MLKEM768 against a test endpoint you control or one you are authorized to test. The --curves option sets the TLS key exchange groups, and when it is set, curl ignores the TLS library's default group list. This runs the handshake with the hybrid group offered. The step closes when the command completes and prints a response or a clear handshake error. If the handshake fails, record the error before changing any settings, because older middleboxes and firewalls may block the larger post-quantum handshake data according to the curl documentation.
Check the verbose TLS line for the group
In the output of the previous command, find the verbose TLS line that names the key exchange group used for the connection and confirm it reads X25519MLKEM768. The curl documentation says to look for this string to verify the hybrid group. The step closes when that line shows X25519MLKEM768. If the line names a classical group such as X25519 or P-256, the hybrid group was not negotiated, so check that the build from the previous steps is the one you are running and that the server accepts the group. Keep the verbose output with the test record, since it is the evidence that the group was negotiated.
Confirm TLS 1.3 is negotiated
Verify that the connection negotiated TLS 1.3, because the wolfSSL post says the groups work in TLS 1.3 only. Look for the protocol version in the same verbose output, or force it with curl -v --tlsv1.3 --curves X25519MLKEM768 against the same endpoint. The curl documentation notes that the default maximum TLS version has been TLS 1.3 since curl 7.61.0 when the library supports it, but the minimum and any configured version limits can still change what is negotiated, so check your configuration. The step closes when the output confirms TLS 1.3 for the connection that showed the hybrid group. If the connection falls back to TLS 1.2, the group cannot apply and the server or client setting needs review.
Repeat the test against production-like endpoints
Run the same command set against endpoints that resemble production, including the proxies, load balancers and CDNs that sit in front of them. Use the same curl build and options, and record the verbose TLS line and the TLS version for each endpoint. Because middleboxes can block larger handshake data, a test endpoint that works does not show that production paths will work. The step closes when every production-like endpoint in scope shows X25519MLKEM768 on a TLS 1.3 connection, or when a failure has been recorded with the endpoint and the error. Confirm with the owners of each endpoint which components terminate TLS, since the group must be supported on the server side as well.
Why --curves controls the key exchange group, not the cipher options
The key exchange group in a curl connection is set by --curves, not by the cipher options. --ciphers (CURLOPT_SSL_CIPHER_LIST) sets the TLS 1.2 and older cipher suites, and --tls13-ciphers (CURLOPT_TLS13_CIPHERS) sets the TLS 1.3 suites, such as TLS_AES_128_GCM_SHA256 and TLS_CHACHA20_POLY1305_SHA256. Those suites define the symmetric and hash algorithms for the connection. They do not select the group used to agree on the session key. Adding a hybrid group such as X25519MLKEM768 to either cipher list will not enable it, so an operator who edits only the cipher options and sees no change has not done anything wrong by the documentation's terms.
When --curves is set, curl passes that list to the TLS library in place of the library's own default list of key exchange groups. The list is not merged with the defaults, so a command that sets --curves X25519 removes every other group from the offer. The wolfSSL backend applies the list through wolfSSL_CTX_set1_groups_list(), following a change in curl pull request 22030, which also removed wolfSSL's default QUIC group setting. The curl changelog lists that fix in 8.21.0, dated June 24, 2026. Confirm which curl and wolfSSL versions your build contains before you rely on this path, because the pull request says the earlier wolfSSL ML-KEM code path was never enabled.
Check the result on the handshake, not in the config file. The curl everything.curl.dev page shows curl -v --curves X25519MLKEM768 and says to look for X25519MLKEM768 in the verbose TLS line. Keep a note of which backend built your curl, since the --curves` behavior described here is documented only for the OpenSSL and wolfSSL backends in the libcurl SSL_EC_CURVES page. The libcurl page does not mention post-quantum groups, and the curl documentation does not say whether a hybrid group is offered by default, so test each target endpoint explicitly.
How the setup differs by backend and build
wolfSSL is the backend with the most detail in the supplied sources. wolfSSL's April 30, 2026 post says a curl built with wolfSSL needs wolfSSL itself configured with --enable-curl, --enable-mlkem and --enable-mldsa. Without these wolfSSL options, the post-quantum groups are not available to curl. The same post says the groups work in TLS 1.3 only, so a connection that falls back to TLS 1.2 will not use them.
- Configure wolfSSL first: Build wolfSSL with
--enable-curl,--enable-mlkemand--enable-mldsabefore building curl against it. - TLS 1.3 only: The post-quantum groups apply to TLS 1.3 handshakes. Confirm the negotiated protocol version in your test output.
- ML-DSA is separate from key exchange: ML-DSA support means the server's leaf certificate has an ML-DSA key. Key exchange with a hybrid group does not by itself mean post-quantum certificates.
- Curves are applied through wolfSSL: PR 22030 changed the wolfSSL backend to apply
--curvesthroughwolfSSL_CTX_set1_groups_list()and removed its default QUIC group setting. - Earlier ML-KEM path was not active: The curl 8.21.0 changelog lists "tls: wolfssl: fixes for PQC key shares", and PR 22030 says the wolfSSL ML-KEM code path was never enabled because
WOLFSSL_HAVE_KYBERis no longer in upstream wolfSSL.
Check the wolfSSL build flags and the curl version together, since fixes to this path appear in specific curl releases.
The supplied facts say only that CURLOPT_SSL_EC_CURVES works with the OpenSSL and wolfSSL backends, and the libcurl page for that option does not mention post-quantum groups. The facts do not state which OpenSSL version or build options enable post-quantum key exchange through curl, so do not assume an OpenSSL build will accept the same --curves value that wolfSSL does without testing it.
- Curves option scope: The
--curvesoption, added in curl 7.73.0, sets the TLS key exchange groups and ignores the TLS library's default list when set. - No default groups stated: The libcurl page gives a default of "" for
CURLOPT_SSL_EC_CURVESthat is embedded in the SSL backend, so the effective default depends on the library. - GnuTLS, mbedTLS, Schannel and rustls: The facts do not cover post-quantum groups for these backends. Do not infer support for them from the SSL comparison table, which lists them for TLS 1.3 but says nothing about post-quantum groups.
- Cipher options differ by backend: With GnuTLS,
--cipherssets the priority string and--tls13-ciphersis ignored, and Schannel cannot set individual TLS 1.2 suites. - Confirm with the library: Ask the library's maintainers or check its documentation for post-quantum group names and minimum versions.
For each backend in use, record the library version and whether a test handshake shows a post-quantum group.
The supplied facts do not give build details for curl packages shipped by operating system distributions. They do not say which TLS library a distribution's curl links against, which curl version it contains, or whether its build enables any post-quantum option. Treat a system package as a separate case that needs its own confirmation rather than as a copy of the upstream build described above.
- Identify the backend: Run
curl -Vto see the version and the TLS library it reports. The features line shows which backend the binary uses. - Identify the curl version: The curl changelog lists 8.23.0, dated October 14, 2026, as the newest upstream release, so a distribution package may be behind that.
- Test the flags: Run
curl -v --curves X25519MLKEM768 and look forX25519MLKEM768` in the verbose TLS line. If the flag is rejected, the build does not support it. - Ask the packager: The facts give no packaging notes, so ask the distribution's maintainers which TLS library and curl version the package uses.
- Do not rely on a global setting: The curl everything.curl.dev page says post-quantum support is mostly handled by the underlying TLS library and does not say whether it is on by default.
Record the package version and the output of curl -V in your inventory.
Where --curves enters a TLS 1.3 handshake
The flow starts when curl is run with --curves X25519MLKEM768, which sets the TLS key exchange groups and replaces the TLS library's default list. The TLS library then builds the ClientHello, and that message carries the hybrid key share for the chosen group. The server selects a group from what it supports, and the handshake completes under TLS 1.3, the only version where these groups work. To check the result, look for X25519MLKEM768 in the verbose TLS output, since that line shows the group that was actually negotiated. Note that this only confirms the key exchange, not the server's certificate signatures.
The --curves value flows into the ClientHello and returns as the negotiated group.
What can break or silently fall back to classical key exchange
A curl command can appear to request a post-quantum group and still complete with a classical one. The cards below cover the points where the requested group is dropped, overridden or never offered, so you know what to check before you trust a verbose-output line.
Older middleboxes and firewalls
The curl documentation warns that older middleboxes and firewalls may block the larger handshake data that post-quantum key exchange produces. A device like this can drop or reject the ClientHello, which may force a retry or a failed connection rather than a clean fallback. Test the hybrid group through the same network path your users or systems will take, and do not assume a pass from a home or lab network.
curl PQC guideTLS 1.2 connections skip TLS 1.3 groups
Key exchange groups set with --curves apply to TLS 1.3 handshakes. A connection that negotiates TLS 1.2 does not use the TLS 1.3 groups, so the hybrid group you asked for is never offered. curl's default maximum is TLS 1.3 when the library supports it, but a server or policy that caps the version at 1.2 ends the attempt there. Confirm the negotiated protocol version in the verbose output along with the group.
Missing --curves leaves library defaults
If a command or script does not pass --curves, curl uses the default group list built into the TLS library. Nothing in that path asks for a hybrid group, so the connection uses whatever the library prefers. Scripts that are copied between hosts or wrap curl in a helper function are the usual place this gets lost. Make the option explicit in every invocation you rely on, and check the verbose output on each host.
A --curves list that omits classical groups
The --curves option replaces the library's default list instead of adding to it. A list such as X25519MLKEM768 alone leaves the server with no group it may already support. A server that does not offer the chosen hybrid group will then fail the handshake, rather than falling back. Include classical groups such as X25519 in the list when you need the connection to succeed against servers that have not been updated, and record that choice as a deliberate decision.
wolfSSL builds without required flags
A curl built against wolfSSL needs wolfSSL itself configured with the flags for curl integration and the post-quantum algorithms, according to wolfSSL's April 2026 post on the topic. A build missing those flags may not offer the post-quantum groups at all. curl's changelog for 8.21.0 also lists a fix for wolfSSL PQC key shares, stating the ML-KEM path had never been enabled. Check your curl build's library version and configure options before relying on wolfSSL for hybrid key exchange.
wolfSSL PQC postNo curl option for ML-DSA signatures
The --curves option controls key exchange only. No curl option selects ML-DSA signatures, so the certificate that authenticates the server is a separate question. Whether the server's leaf certificate uses an ML-DSA key depends on the server's certificate and its issuing chain, not on your curl command. Treat key exchange and certificate signatures as two separate checks in your inventory.
Questions engineers ask about enabling PQC in curl
Is curl quantum safe?
The sources support no such claim, and this page does not make one. curl itself does not implement post-quantum algorithms. Hybrid key exchange comes from the TLS library curl is built against, so whether a given curl build can negotiate a post-quantum group depends on that library and its version. curl's own TODO and security pages, checked on 2026-12-03, do not mention post-quantum cryptography and list no roadmap item for it. Treat quantum safety as a property of a specific build, backend and configuration that you test yourself. The Everything curl PQC page confirms the handshake is mostly handled by the TLS library.
Which curl version do I need for post-quantum key exchange?
The sources do not give a minimum curl version for post-quantum key exchange, and the Everything curl page does not say whether it is on by default. The version that matters most is the TLS backend you build curl with. The curl 8.21.0 changelog of June 24, 2026 lists a fix for wolfSSL post-quantum key shares, and the related pull request says the wolfSSL ML-KEM code path was never enabled because upstream wolfSSL no longer defines the old flag. The newest curl release listed is 8.23.0, dated October 14, 2026. Check the changelog for your target version and confirm the backend version in curl -V.
Does enabling post-quantum key exchange in curl cost extra?
The sources do not state a price, and this page does not estimate one. The cost depends on what you already run. If your curl links against a TLS library that already offers hybrid groups, the main cost is testing time. If you must change the TLS backend or rebuild curl, you pay for build engineering, library licensing where it applies, and retesting the scripts and services that call curl. wolfSSL's April 30, 2026 post says a wolfSSL-built curl needs wolfSSL configured with specific flags, which means a rebuild. Ask your vendor or internal platform team to quote each of these items separately, and ask which parts recur with each library upgrade.
What breaks when curl negotiates a post-quantum group?
The Everything curl page warns that larger post-quantum handshake data may be blocked by older middleboxes and firewalls, so connections may fail or stall at those devices. Test each path your scripts and services use, including any proxy or inspection device. Settings also interact with the rest of the configuration. For example, --curves replaces the library's default group list when set, so a stale value can drop the classical groups a server needs. The wolfSSL post notes the groups work only in TLS 1.3, so a client limited to TLS 1.2 will not negotiate them. Run `curl -v --curves X25519MLKEM768 against a test endpoint and confirm the group name in the verbose TLS line before you change production scripts.
What should I ask the vendor or maintainer before enabling it?
Ask which TLS backend and version your curl build uses, and whether that version enables the post-quantum groups you need. Ask whether the groups are on by default or must be set with --curves or CURLOPT_SSL_EC_CURVES, and note that the libcurl page for that option lists only the OpenSSL and wolfSSL backends and does not mention post-quantum groups. Ask whether the build supports ML-DSA certificate signatures, since the sources give no curl option for selecting them. Ask whether any published roadmap, notice or deprecation plan covers post-quantum support, because curl's TODO page lists none as of 2026-12-03. Get the answers in writing and record the date you received them.
Can we test and collect evidence for curl post-quantum settings ourselves?
Your engineers can run the basic test on their own. The verbose TLS line from curl -v --curves X25519MLKEM768 shows whether a hybrid group was negotiated, and the wolfSSL and curl pages list the build flags to check. Outside help becomes useful when the work spans several services, middleboxes and backends, or when a reviewer needs a documented, repeatable test record. DeployOpen plans, implements, tests and documents self-hosted platforms inside your own infrastructure, and it prepares evidence for compliance assessments, though it does not issue audit reports or certifications. Scope any such engagement in writing before work starts, and ask for the test results and the retest plan as deliverables.
Does enabling post-quantum key exchange change how curl verifies servers?
The sources do not say that post-quantum key exchange changes server verification. Certificate checks remain under the normal settings. CURLOPT_SSL_VERIFYPEER is enabled by default, and curl uses the CA bundle fixed at build time unless CURLOPT_CAINFO or CURLOPT_CAPATH override it. Key exchange and certificate signatures are separate parts of the handshake. A hybrid key exchange protects the session key and does not by itself change which certificate authority you trust. Keep verification enabled while you test, and confirm which CA bundle your build uses with the curl CA extract page as the reference for the bundle's origin.
How DeployOpen helps teams test and roll out curl key exchange
DeployOpen approaches curl key exchange as a set of checks rather than a single switch. The work starts by confirming which curl build, TLS backend and version your systems run, because the --curves option and its post-quantum group names depend on that backend. Each change is then tested against the servers and middleboxes your traffic actually crosses, and the results are documented for your security and compliance reviewers.
How we scope
- We record the curl version, TLS library and build options on each system in scope before any change is planned.
- The written scope lists which endpoints, scripts and services will be tested, and which will stay out of scope.
- We confirm with you which TLS 1.3 settings and key exchange groups must keep working, so compatibility limits are agreed in writing early.
How we build
- We set key exchange groups with --curves only on backends where the documentation confirms that option applies, and we verify the result on the wire.
- We test hybrid groups against your own servers and any firewalls or inspection devices, since larger handshake data can be blocked by older equipment.
- We keep the current configuration in version control so every change can be reverted if a connection fails after rollout.
How we hand over
- You receive a runbook with the exact commands, the verbose TLS output to look for, and the steps to confirm a group was negotiated.
- Test results record the curl version, backend and server tested, so reviewers can match each finding to a specific build.
- The documentation states which settings are not covered by the tests, so your team knows what still needs manual checks.
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
- Ongoing support is available as a retainer for curl upgrades, backend changes and retesting after library updates.
- When curl or its TLS library changes default behavior, we retest the affected scripts and report any differences to you.

