Which curl functions depend on RSA and elliptic-curve keys

curl's public-key use comes from the TLS or SSH library underneath it: certificate signatures, key exchange groups, client certificates, pinned keys and SSH host keys. Stronger key exchange options exist only through specific backends and builds, and the curl project has published no post-quantum roadmap as of December 3, 2026.

On this page

Which curl connections rely on public-key cryptography today

If you are inventorying curl in scripts, pipelines or services, treat every curl TLS and SSH connection as dependent on public-key algorithms. Those algorithms come from the TLS or SSH library curl is built against, not from curl itself. They include the key exchange groups, the server certificate signatures, any client certificate, any pinned public key and any SSH host key. As of curl 8.23.0 (October 14, 2026), the curl project's documentation sets no default post-quantum key exchange group. The sources checked on December 3, 2026 were curl's changelog, its SSL backend comparison, the libcurl option pages and the Everything curl post-quantum page, and they confirm this. Engineers who run curl in automation and security leads who must record a per-product answer both need this picture before any setting is changed.

Start the inventory with the options that name keys directly. The --cert option has no default file, and curl prompts for a password if none is given. --pinnedpubkey (CURLOPT_PINNEDPUBLICKEY) and --hostpubsha256 (CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256) bind a connection to specific public keys, and the SSH option fails scp and sftp transfers on a hash mismatch. Certificate verification is on by default, and the CA bundle is fixed at build time unless --cacert or --capath overrides it. Confirm in your own builds which CA bundle is in use with curl -v, since the bundle is set when curl is built and the sources do not say which bundle a given distribution ships. Record each script that uses these options, because a later key or certificate change will break it.

Where curl's public-key dependencies sit, by version and component

This table lists each curl setting or data flow that relies on public-key cryptography, the version that introduced it, its default, the TLS backends it works with, and the source checked. Read each row as a question to answer for your own build: if the component is in use and the backend matches, the dependency applies. The main takeaway is that curl's own documentation sets no default for most public-key algorithms, so the TLS library in use decides what is negotiated.

ComponentIntroduced inDefault and backendsSource checked
Key exchange groups (--curves)curl 7.73.0No default in curl. When set, it replaces the TLS library's default group list. Backend behavior varies; OpenSSL and wolfSSL apply it directly.curl man page; libcurl SSL_EC_CURVES
CURLOPT_SSL_EC_CURVESNot stated in supplied sourcesDefault is an empty string embedded in the SSL backend. Works only with OpenSSL and wolfSSL.libcurl SSL_EC_CURVES
Server certificate signaturesNot a curl optionSet by the server's certificate and the TLS library. curl checks them when CURLOPT_SSL_VERIFYPEER is enabled, which is the default.libcurl SSL_VERIFYPEER
Client certificates (--cert)Long-standing optionNo default file. curl prompts for a password if none is given. --cert-type defaults to PEM, except P12 on Schannel.curl man page
CURLOPT_PINNEDPUBLICKEYcurl 7.39.0Default NULL. Accepts sha256// hashes or a PEM or DER key file. Works with GnuTLS, OpenSSL, Schannel, mbedTLS and wolfSSL.libcurl PINNEDPUBLICKEY
CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256curl 7.80.0Applies to scp and sftp transfers. The transfer fails if the base64 SHA256 hash of the server's host key does not match.libcurl SSH host key
CA bundle trust (CURLOPT_CAINFO, CURLOPT_CAPATH)Long-standing optionBuild-time CA path by default. The bundle cacert.pem is converted from Mozilla's store and omits Firefox name constraints.libcurl SSL_VERIFYPEER; curl CA extract
wolfSSL post-quantum key share fix (PR 22030)curl 8.21.0 (June 24, 2026)Applies --curves through wolfSSL's group list and removes the default QUIC group. Earlier wolfSSL ML-KEM code was never enabled.curl changelog; curl PR 22030
Minimum TLS versioncurl 8.16.0TLSv1.2 by default. A stricter rule in the TLS library can override it.libcurl SSLVERSION

Which parts of a curl connection carry public keys

A curl connection uses public-key cryptography in several separate places, each set by a different option or library. Each card below names one of these places, says what it means for the answer, and shows which settings and sources to check.

TLS key exchange groups

The key exchange groups decide how the TLS session key is agreed, and curl passes them to the TLS library. The --curves option sets the list, and when it is set curl ignores the library's default list. Curl's documentation does not state a default list for these groups, so the library defaults apply unless you set --curves yourself. The curl changelog notes that the wolfSSL ML-KEM code path was never enabled, so check the backend version before relying on any group. Confirm which groups actually negotiate in your build with curl -v.

curl PQC guide

Server certificate signatures and CA bundle

Server certificates are signed with RSA or elliptic-curve keys, and curl checks those signatures against a trusted root list. Peer verification is on by default, and curl uses a CA bundle path fixed at build time unless CURLOPT_CAINFO or CURLOPT_CAPATH overrides it. The bundle curl publishes as cacert.pem is converted from Mozilla's store and omits Firefox's name constraints, so the file you use may differ from your system store. Check which CA file your build uses, since that file decides which signatures are trusted.

curl CA extract

Client certificates

A client certificate adds a key pair that the client uses to prove its identity to the server. The --cert option has no default file, so client authentication happens only when you pass it, and curl prompts for a password if none is given. The --cert-type default is PEM on most backends but P12 on Schannel. Inventory every script and service that passes --cert or CURLOPT_SSLCERT, because each one carries a client key that must be replaced in a later upgrade.

curl man page

Pinned public keys

Public-key pinning limits trust to a specific server key, using CURLOPT_PINNEDPUBLICKEY, which was added in curl 7.39.0 and defaults to NULL. The option accepts sha256 hashes or a PEM or DER key file, and it works only with GnuTLS, OpenSSL, Schannel, mbedTLS and wolfSSL. A pin ties the connection to one key, so a server key change breaks the connection until you update the pin. Find every pinned value in your scripts and check its backend.

PINNEDPUBLICKEY docs

SSH host keys for scp and sftp

For scp and sftp transfers, curl can check the server's SSH host key against a fixed value using CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, which was added in curl 7.80.0. A transfer fails when the base64 SHA256 hash of the server's public key does not match the value you set. This check protects only the pinned host, so a host key rotation will stop transfers until the stored hash is updated. Record the hash used by each transfer job so you can plan key changes.

SSH host key docs

The TLS library as the key provider

Curl does not generate or check any of these keys itself. The TLS or SSH library behind it provides the key exchange, signature checks and pinning, and curl's supported backends include OpenSSL, GnuTLS, wolfSSL, mbedTLS, Schannel and rustls, with rustls marked as experimental. Which library your curl uses therefore decides what each setting above does. Check your backend with curl -V, and confirm the library version, since the same option can behave differently across backends.

curl SSL comparison

How the answer changes by TLS backend and deployment

OpenSSL is one of the backends curl's comparison table lists, and it is the backend where the --curves option is documented to apply. The libcurl page for CURLOPT_SSL_EC_CURVES says the option works only with the OpenSSL and wolfSSL backends and that its default is embedded in the SSL backend. CURLOPT_PINNEDPUBLICKEY also works with OpenSSL, so a pinned public key check is available here.

  • Key exchange groups: --curves sets the TLS key exchange groups, for example X25519:P-521, and when set it replaces the library's default list.
  • Pinned keys: CURLOPT_PINNEDPUBLICKEY accepts sha256// hashes or a PEM or DER public key file, and it works with OpenSSL.
  • Ciphers: TLS 1.3 suites come from --tls13-ciphers, and TLS 1.2 and older suites come from --ciphers.
  • Default maximum version: TLS 1.3 is the default maximum where the library supports it, and the minimum accepted version is TLSv1.2 since curl 8.16.0.
  • Post-quantum groups: the curl everything.curl.dev page shows a hybrid group selected with --curves X25519MLKEM768, but it does not say whether the group is on by default in a given OpenSSL build.

Confirm the OpenSSL version your curl links against, then run curl -v against a test server and look for the group name in the TLS line.

Where public keys appear in a curl TLS handshake

The diagram starts when curl opens a TLS connection and offers the key exchange groups set by --curves, which are a key exchange choice rather than a signature. The server answers with its own key share and a leaf certificate signed with RSA or ECDSA, and curl checks that chain against the CA bundle set at build time or overridden by CURLOPT_CAINFO or CURLOPT_CAPATH. If CURLOPT_PINNEDPUBLICKEY is set, curl also compares the server's public key to the pinned value, and if --cert is set, curl presents a client certificate that the server verifies. Check each arrow against the TLS library in your build, since the pinning and key exchange steps behave differently across backends.

The public-key steps in a curl TLS handshake, labeled by algorithm class.

What to check in your curl estate, in order

This sequence maps every curl binary, library build and script that touches public-key cryptography, then records the key types and tests whether a hybrid key exchange group is negotiated. The output is an inventory you can hand to the security and vendor-risk owners who need to record an answer for each curl deployment.

  1. Inventory curl binaries and libcurl builds

    Run curl -V on every host and container image where curl or libcurl is installed, and record the version, the TLS backend named in the output, and the install path. Include libcurl pulled in by language runtimes and packages, since those builds are separate from the command line tool. The step is done when every binary and library build has one row in the inventory with its version and TLS backend. Confirm the backend with the distribution or build owner, because the same version string can be compiled against different TLS libraries.

  2. List scripts and services that set key options

    Search configuration management, CI pipelines, cron jobs and application code for --curves, --cert, --pinnedpubkey, --ssh-hostpubsha256 and their libcurl equivalents such as CURLOPT_SSL_EC_CURVES and CURLOPT_PINNEDPUBLICKEY. Record which team owns each script and which host runs it. The step is done when every match is listed with its file path, owner and the option it sets. Options passed through wrapper tools or environment variables also need a row, because they do not appear in the curl command line.

  3. Record key types for each server certificate

    For each endpoint your curl calls reach, retrieve the server certificate and record the public key type and size, such as RSA with a given modulus length or an elliptic-curve key on a named curve. Use your normal certificate inspection tooling and store the result beside the endpoint name. The step is done when every endpoint has a recorded key type. Remember that the server's key type governs certificate signatures, while key exchange is negotiated separately, so the two need separate columns.

  4. Record pinned keys and client certificates

    Using the list from the second step, note every client certificate passed with --cert, its key type and its storage location, and every pinned public key or SSH host key hash. Record the expiry and the owner for each. The step is done when each pin and client certificate has an owner, an expiry date and a key type. Pinned values must be re-checked whenever the server key rotates, so this list is the record of what would break during a change.

  5. Check the TLS version and cipher settings

    Record the minimum and maximum TLS version each script allows, and the --ciphers and --tls13-ciphers values set for each build. Remember that the TLS 1.3 list and the TLS 1.2 list apply separately, and that GnuTLS and Schannel handle these options differently. The step is done when each build's effective TLS range and cipher configuration is recorded. Confirm any backend-specific behavior with the build owner rather than assuming the option was honored.

  6. Test for a hybrid key exchange group

    On a curl build that the vendor or build owner confirms supports the hybrid group, run curl -v --curves X25519MLKEM768 against a test endpoint you control and read the verbose TLS output for the group name. Repeat this only on builds you have already listed as supporting the group, and do not generalize one result to other builds or backends. The step is done when each tested build either shows the group in the verbose TLS line or is recorded as not showing it. A missing group name is a finding to record, not a failure of the test, and results can differ depending on the server and middlebox in the path.

  7. Record results and confirm open questions

    Consolidate the inventory, key types, pins and hybrid test results into one table, and list each question you could not answer from the documentation, such as whether a given distribution build includes a particular TLS library version. Send those questions to the curl build owner or the vendor, and record the date you asked. The step is done when the table is complete and every open question has a named owner. This table is the evidence set for the security and vendor-risk review.

What curl has not published and what to ask

The curl project's own pages say little about post-quantum cryptography, and the libcurl and command line options that could control it are either undocumented for post-quantum groups or unchanged. Before relying on curl for post-quantum key exchange, ask the curl project or your distributor the questions below, and confirm the answers against the version you run.

No post-quantum roadmap item

The curl TODO page, checked on 2026-12-03, lists no post-quantum roadmap item. The security page and SSL backend comparison do not mention post-quantum cryptography, FIPS or CNSA 2.0 either. Ask the curl project whether post-quantum key exchange or signatures are planned, and by which release, and ask your distributor whether it plans to track that work.

curl TODO page

No default for --curves

The --curves option, added in curl 7.73.0, sets the TLS key exchange groups, and when it is set it ignores the TLS library's default list. curl's own docs set no default value for it, so the groups a connection offers depend on your build and TLS library. Ask the curl project what the default group list is for each backend, and confirm the list your build sends with a verbose connection.

curl man page

No minimum version for PQC

The curl everything.curl.dev page on post-quantum says it is mostly handled by the underlying TLS library, but it gives no minimum curl version and does not say whether post-quantum key exchange is on by default. Ask the curl project which release first supports hybrid groups in each backend, and whether a given release enables them without any option.

Everything curl PQC

No option for ML-DSA signatures

The Everything curl page gives no curl option for selecting ML-DSA signatures. Post-quantum signatures depend on the server's leaf certificate, which must carry an ML-DSA key, as wolfSSL's April 2026 post notes for wolfSSL-built curl. Ask the curl project whether any option selects ML-DSA on the client side, and ask the server operator which certificate key type they issue.

wolfSSL PQC in curl

CURLOPT_SSL_EC_CURVES omits PQ groups

The libcurl page for CURLOPT_SSL_EC_CURVES works only with the OpenSSL and wolfSSL backends and does not mention post-quantum groups. Its default is an empty string embedded in the SSL backend. Ask the curl project whether this option is meant to carry hybrid groups such as X25519MLKEM768, and whether its documentation will be updated to say so.

CURLOPT_SSL_EC_CURVES page

What can go wrong when stronger key exchange is attempted

Attempting a stronger key exchange in curl can fail in ways that look like success. The Everything curl PQC page warns that larger post-quantum handshake data may be blocked by older middleboxes and firewalls, so a connection that worked before may fail or degrade once a hybrid group is offered. Before changing settings, test the path from the client's network to each target, including any inspection devices, and confirm the handshake still completes. The same page gives no minimum curl version for post-quantum support and does not say whether it is on by default, so confirm both in your own build.

A curl build without the library support will not refuse a post-quantum request. The --curves option sets the TLS key exchange groups, and when it is set it replaces the TLS library's default list, so a bad list can remove groups you expect and leave only classical ones. Check the verbose TLS line for the group that was actually negotiated, for example X25519MLKEM768, rather than trusting the command you typed. A list that omits the hybrid group will also produce a classical handshake with no error.

The wolfSSL path needs specific attention. curl PR 22030 says the wolfSSL ML-KEM code path was never enabled because WOLFSSL_HAVE_KYBER is no longer in upstream wolfSSL, and the fix shipped in curl 8.21.0 (June 24, 2026). A curl built against wolfSSL before that release should not be assumed to negotiate ML-KEM. Confirm the curl version, the wolfSSL build flags described in wolfSSL's post (--enable-curl, --enable-mlkem, --enable-mldsa), and the negotiated group, and remember the groups work only in TLS 1.3.

Questions engineers and vendor-risk reviewers ask about curl's public keys

Is curl quantum safe?

The sources do not support calling curl quantum safe, and no certification or validation of curl for post-quantum use is listed on the pages checked. curl does not implement post-quantum algorithms itself. Its key exchange and signature behavior comes from the TLS library it is built with, so the answer depends on that backend. Recent changes show partial support in some backends: the wolfSSL backend received fixes for post-quantum key shares in curl 8.21.0, and wolfSSL's April 30, 2026 post describes a configuration that enables ML-KEM groups in TLS 1.3. Confirm the exact backend, version and build flags in your environment before recording any answer about curl's readiness.

Which curl version do I need for post-quantum key exchange?

The sources give no minimum curl version for post-quantum support. The curl 8.21.0 changelog, dated June 24, 2026, lists a wolfSSL bugfix for post-quantum key shares, but that is a fix, not a stated minimum. curl's own post-quantum page says the feature is mostly handled by the underlying TLS library and does not say whether it is enabled by default. The newest release listed is 8.23.0, dated October 14, 2026. For your inventory, record the curl version, the TLS backend and the backend version together, and ask the vendor or distributor for the exact build that includes the required library support.

Does enabling post-quantum support in curl cost extra?

curl is open source under its own license, so the tool itself carries no license fee in the sources reviewed. Cost comes from the work around it: confirming that the TLS library in your build supports the needed groups, rebuilding or updating curl and that library, and testing against your servers and middleboxes. If you use a commercial TLS library or a vendor-packaged curl, licensing and support terms come from that supplier. Ask any provider to state which library, version and build options they ship, whether support is one-time or recurring, and who maintains the build after release. No price or effort figure is given in the sources, so none is stated here.

What breaks when curl uses post-quantum key exchange?

The sources name one main risk: larger post-quantum handshake data may be blocked by older middleboxes and firewalls. Before changing settings, check:

  • Whether intermediate devices accept larger TLS handshake messages.
  • Whether the server supports the same hybrid group that curl offers.
  • Whether the server certificate, client certificate or pinned public key still matches your configuration.

The pages checked give no curl option for selecting post-quantum signatures, so certificate changes are a separate task from key exchange. Test with curl -v and look for the group name in the verbose TLS output, for example X25519MLKEM768, before rolling out a change.

What should I ask the curl vendor or distributor about post-quantum support?

Ask for these items in writing:

  • The curl version and the TLS backend (OpenSSL, GnuTLS, wolfSSL, mbedTLS, Schannel or rustls) in the build you run.
  • The exact backend version, and whether it includes the post-quantum groups you need.
  • Whether post-quantum key exchange is on by default in that build, and which option enables it.
  • Whether certificate signatures using ML-DSA are supported, and how the server certificate must be issued.
  • Any stated timeline or roadmap for support, with the date it was published.

The curl TODO page, security page and SSL comparison page, checked 2026-12-03, do not mention post-quantum cryptography or a roadmap item, so do not accept an answer from curl's own project pages as a commitment.

Can my team make curl post-quantum ready in-house, or do we need outside help?

Your team can do the inventory and the configuration checks in-house: record every curl build, its backend and version, and every place curl connects to a server. The change itself depends on whether your build includes the needed library support. If it does not, the work is a rebuild or a package update, which is typically handled by the team that maintains your curl builds. Outside help is useful for testing across your network, including middleboxes, and for documenting evidence for an assessment. DeployOpen can plan, implement and test this work in your infrastructure on a fixed scope agreed in writing, and it does not issue audit reports or certifications.

How DeployOpen works on this

DeployOpen helps teams map where curl's data flows and logins rely on RSA and elliptic-curve keys, then plan changes against the backend and settings the team actually runs. Work is scoped in writing first, so the inventory, test notes and handover match the curl version and TLS library in use.

How we scope

  • We agree in writing which curl versions, TLS backends and build options fall within the engagement.
  • We list the curl workflows to cover, such as scripted API calls, client certificates, pinned keys and SSH transfers.
  • Engagements are fixed-scope, and the written scope sets the deliverables and what the inventory must confirm.

How we build

  • We record the TLS library, cipher and curves settings each curl call uses, checked against curl's documentation for that version.
  • We check the CA bundle, client certificate, pinned public key and SSH host key settings for each workflow in scope.
  • We test whether --curves and the TLS library's group list take effect, using the verbose TLS line rather than assumed defaults.

How we hand over

  • You receive an inventory of public-key dependencies per curl workflow, with the version and backend each entry applies to.
  • Each open item is marked as confirmed, unconfirmed or pending a vendor answer, with the source named for each fact.
  • We document the test steps and commands used, so your team can repeat the checks after any curl or library upgrade.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer once the inventory is handed over.
  • When curl, its TLS backend or the published guidance changes, the inventory can be re-checked against the new release notes.
  • Ask any quote to name the curl versions, backends and workflows it covers, and what a re-check after a change would include.

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.