PostgreSQL post-quantum enablement: connections, drivers and build options

PostgreSQL has no post-quantum feature of its own. Hybrid ML-KEM key exchange is possible only through the ssl_groups setting on PostgreSQL 18 or later, linked against an OpenSSL build that supports the group, as of 2026-12-03.

On this page

Can PostgreSQL connections use post-quantum key exchange today?

If you run PostgreSQL or connect to it over TLS, you need a clear answer for your readiness record: can those connections use post-quantum key exchange today? The PostgreSQL documentation checked on 2026-12-03 describes no PostgreSQL-specific post-quantum feature. However, a hybrid group such as X25519MLKEM768 can be negotiated by setting ssl_groups on PostgreSQL 18 with OpenSSL 3.5, as a February 2026 message on the pgsql-hackers list shows. That is a configuration you can test, not a documented product capability.

The default for ssl_groups is X25519:prime256v1, which contains no post-quantum group, so a stock installation negotiates classical key exchange only. The release notes for PostgreSQL 18 and 19 do not mention post-quantum cryptography, ML-KEM, ML-DSA or SLH-DSA. The hackers message also says versions before 18 could not accept the ML-KEM group name because ssl_ecdh_curve rejected it, and the thread text available to us includes no committer answer on backporting. Confirm the minimum version and OpenSSL build for your own environment before you write anything down.

The client side is a gap in the documentation. The libpq connection parameters page lists no groups parameter, so a client cannot choose key exchange groups through PostgreSQL settings. Whether a given client negotiates a hybrid group depends on the TLS library it links against, which you must check for each driver and build. Note also that sslmode defaults to prefer, which the documentation says makes no sense from a security point of view, so a connection may be encrypted without verifying the server at all. Set verify-full where you need server identity checked.

This question matters to anyone who runs a PostgreSQL server or application that connects to one over TLS and must record a readiness answer for it. Database engineers should test the ssl_groups setting on a non-production server and record the exact PostgreSQL, OpenSSL and client library versions used. Security leads and vendor-risk reviewers should treat the current answer as "not documented by the project, configurable in a tested build" and ask the PostgreSQL project or your distributor whether a supported path exists.

Which PostgreSQL versions and settings apply to key exchange

This table compares which PostgreSQL versions, client settings and library results matter for TLS key exchange groups, with each row sourced and dated. Read the server rows for what the server setting controls and the libpq rows for what the client can choose. The main takeaway is that no documented PostgreSQL default includes a post-quantum group, and the only post-quantum result is a hackers-list test that needs PostgreSQL 18 and OpenSSL 3.5.

Version or componentKey exchange setting or behaviorPost-quantum statusSource and check date
PostgreSQL 14Out of the support window, so no new key exchange work applies to itNot documented for post-quantumPG Versioning page, checked 2026-12-03
PostgreSQL 18 (18.7, first released 2025-09-25)ssl_ecdh_curve renamed to ssl_groups, which accepts a colon-separated list; default now includes X25519; OpenSSL older than 1.1.1 removedNot documented; a hackers-list test shows ML-KEM only when ssl_groups names it and OpenSSL 3.5 is linkedPG 18 release notes; PG Versioning page, checked 2026-12-03
PostgreSQL 19 (19.0, first released 2026-11-19)ssl_groups defaults to X25519:prime256v1No post-quantum group in the default; the release notes do not mention post-quantum cryptographyPG Connection settings, 19; PG 19 release notes, checked 2026-12-03
libpq clientsslmode defaults to prefer, verify-full checks the CA chain and host name; channel_binding defaults to prefer; no groups parameterNo client-side setting chooses key exchange groupsPG libpq connection parameters, checked 2026-12-03
Hackers-list test, OpenSSL 3.5ssl_groups set to X25519MLKEM768:X25519:prime256v1 on PostgreSQL 18 negotiated the hybrid group X25519MLKEM768 over TLS 1.3Shows a test result only; no committer answer on backporting to earlier versions is in the threadPG hackers thread, 2026-02-19

Which parts of a PostgreSQL connection the key exchange question touches

A PostgreSQL connection involves several separate settings: key exchange, protocol versions, certificates, client authentication and password storage. Post-quantum key exchange affects only part of this path, so each item below states what it changes and what it leaves alone.

Server ssl_groups and its OpenSSL dependency

The server setting ssl_groups selects the named groups for TLS key exchange, as a colon-separated list. Its documented default is X25519:prime256v1, and that default contains no post-quantum group. PostgreSQL passes the value to OpenSSL, so whether a hybrid group such as X25519MLKEM768 can be negotiated depends on the OpenSSL build the server links against. A February 2026 mailing list message shows this working on PostgreSQL 18 with OpenSSL 3.5. Confirm the group name and OpenSSL version in your own build before you rely on it.

Connection settings

Protocol version and TLS 1.3 cipher settings

ssl_min_protocol_version defaults to TLSv1.2, and ssl_tls13_ciphers governs TLS 1.3 cipher suites and uses OpenSSL's built-in suites when left blank. Neither setting selects a key exchange group, so they do not decide whether post-quantum key exchange happens. Check them anyway, because a connection can only use a hybrid group if it negotiates TLS 1.3. Setting the minimum to TLSv1.3 excludes clients that only support TLS 1.2.

libpq client and sslmode defaults

The libpq client decides how it verifies the server. Its sslmode defaults to prefer, which the documentation calls insecure and keeps only for backward compatibility. The libpq connection parameters page documents no groups parameter, so the client has no PostgreSQL-specific setting for choosing key exchange groups. Whatever groups the client offers come from the OpenSSL library it is linked against. Clients built against an older OpenSSL may not offer a post-quantum group, so the server cannot negotiate one with them.

libpq connection parameters

Server certificate and key files

The certificate and private key the server presents are loaded from ssl_cert_file and ssl_key_file, which default to server.crt and server.key in the data directory. The documentation sets no restriction on key type, only that the key must match the certificate. Changing ssl_groups does not change these files. Signatures and the certificate chain are authenticated separately from key exchange, so a post-quantum key exchange still needs a certificate and chain that the clients trust.

SSL TCP docs

Client certificates under ~/.postgresql

Client certificates and keys default to ~/.postgresql/postgresql.crt and ~/.postgresql/postgresql.key, and may be PEM or DER. The key may be encrypted with any algorithm OpenSSL supports. The server checks client certificates through ssl_ca_file and the clientcert option in pg_hba.conf. None of this changes with ssl_groups, so client authentication keys must be reviewed on their own, and key exchange changes do not cover them.

libpq SSL docs

Channel binding and SCRAM

The libpq option channel_binding defaults to prefer when libpq is built with SSL support, and password_encryption defaults to scram-sha-256. Channel binding ties password authentication to the TLS session, but it does not change the key exchange group. A post-quantum group changes the TLS session, not the password hashing or SCRAM iteration count. Check these settings separately when you inventory password authentication.

Password authentication docs

Which OpenSSL build a PostgreSQL server needs before a hybrid group can be used

A hybrid key exchange group such as X25519MLKEM768 can only be used on a PostgreSQL server if the OpenSSL library that PostgreSQL is linked against supports that group. PostgreSQL does not implement TLS itself. It relies on OpenSSL on both the client and the server, and it reads the system-wide openssl.cnf file, which can be redirected with the OPENSSL_CONF environment variable. Before setting anything in PostgreSQL, the administrator should confirm which OpenSSL version the server binary is linked against, and whether the same library is used by the client tools and drivers that will connect to it.

The server setting ssl_groups takes a colon-separated list of group names and passes that value to OpenSSL's SSL_CTX_set1_groups_list. A group name that the linked build does not recognize will not be negotiated. The pgsql-hackers message of 2026-02-19 shows PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5. The same message says earlier PostgreSQL versions rejected the ML-KEM group name because ssl_ecdh_curve could not accept it, and it asks whether the change could be backported. The thread text available contains no committer answer on that question, so the reader should not assume backported support.

The PostgreSQL 18 release notes say support for OpenSSL versions older than 1.1.1 was removed, and the PostgreSQL 19 connection settings state that X25519 is not allowed when OpenSSL is in FIPS mode. The documentation does not publish a list of OpenSSL versions that support each group name, so the reader should confirm the build with their own test: set ssl_groups on a test server, connect with a client that uses the same OpenSSL library, and check the negotiated group in the session. Repeat the test on each OpenSSL and PostgreSQL version in the upgrade plan, including any FIPS-mode builds.

How the answer differs by PostgreSQL version line and deployment model

PostgreSQL 18 is the version line where the ssl_groups setting can name a post-quantum hybrid group, provided the server links against a rebuilt OpenSSL 3.5 or later. The setting was renamed from ssl_ecdh_curve in the 18 release and accepts a colon-separated list of group names. A pgsql-hackers message dated 2026-02-19 shows a PostgreSQL 18 server with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating the hybrid group X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5.

  • Setting name: ssl_groups, which replaced ssl_ecdh_curve in the 18 release notes, with the old name still accepted.
  • Default value: X25519:prime256v1 in the current documentation, which contains no post-quantum group, so the setting must be changed.
  • Library requirement: OpenSSL 3.5 or later, built so that the ML-KEM group name is recognised. The documentation checked does not list a minimum build flag, so confirm this with the build.
  • Client side: libpq has no documented parameter for choosing key exchange groups, so the server setting is the only PostgreSQL-specific control the documentation describes.
  • Scope of the evidence: the single hackers message is the only source for a working negotiation, and it is not a release note or test report.

Before relying on this path, confirm with your own handshake test that the negotiated group matches what you configured, using the OpenSSL build your server actually loads.

What a database team should check before turning on a hybrid group

This sequence confirms that the PostgreSQL server, its linked OpenSSL build and every libpq client can negotiate a hybrid key exchange group before any production setting changes. Each step ends with a recorded check, so the team knows which versions and settings were tested.

  1. Record PostgreSQL and OpenSSL versions

    On each server and client, record the PostgreSQL major version (for example, 18 or 19) and the version of the OpenSSL library it is linked against. Run postgres --version for the server and pg_config --version for the installed client libraries, then check which OpenSSL build the binary loads, for example with ldd on Linux or otool -L on macOS. The step is done when every host has a row with the server version, the OpenSSL version, and the host name. Support status for each major version should be checked on the PostgreSQL versioning page, because 14 is listed there as no longer supported.

  2. Confirm OpenSSL supports the hybrid group name

    On a test server linked to the same OpenSSL build, confirm that the library accepts the hybrid group name you plan to use, such as X25519MLKEM768. A quick check is openssl list -tls1_3 -groups or a test handshake with openssl s_client -groups X25519MLKEM768, depending on the build. The step closes when the group name appears in the library's output or completes a handshake. The PostgreSQL documentation does not list post-quantum groups, so this check against OpenSSL is the only evidence of support you can rely on at this point.

  3. Set ssl_groups on a non-production instance

    On a non-production PostgreSQL instance, set ssl_groups to a colon-separated list that starts with the hybrid group, followed by a classical fallback, for example X25519MLKEM768:X25519:prime256v1. The PostgreSQL 19 documented default is X25519:prime256v1, so the change is deliberate. Reload the configuration, then confirm that the server starts without error and that the setting shows in SHOW ssl_groups;. Leave ssl enabled with the certificate and key you already use, because ssl defaults to off.

  4. Confirm negotiation from a client connection

    From a client on the same OpenSSL build, connect to the test instance with sslmode set to require or stricter and check which key exchange group was used. Query SELECT ssl, version, cipher, bits FROM pg_stat_ssl WHERE pid = pg_backend_pid(); from the session, and compare the negotiated values with what you expect. The step closes when the session reports TLSv1.3 and the connection succeeds with the hybrid group in place. The PostgreSQL view does not show the key exchange group, so record the client-side OpenSSL test result as the evidence for the group. A failed negotiation should fall back to the next group only if the fallback is in your list.

  5. Confirm each libpq client's TLS library version

    For every application, driver, pooler and proxy that uses libpq, record the TLS library and its version that the client binary loads. Use pg_config --configure to see whether libpq was built with OpenSSL, and check the loaded library with ldd or otool -L on the client binary. The step is done when each client has an entry showing its OpenSSL version and that it matches a build tested in the earlier steps. Clients that load a different OpenSSL, or that use a driver with its own TLS stack, need a separate test before rollout.

  6. Check sslmode is verify-full where chains matter

    For each client connection where the server certificate chain must be validated, set sslmode=verify-full in the connection string or environment, and confirm it is not left at the default prefer. The PostgreSQL documentation states that prefer makes no sense from a security point of view and is kept only for backward compatibility. The step closes when a test connection with verify-full succeeds against the test instance, and fails when given a certificate that does not match the host name or the CA. Record the sslmode value used by each client.

  7. Record results with dates and sources checked

    Write one dated record for the whole sequence, listing the server and OpenSSL versions, the ssl_groups value tested, the client libraries and their TLS versions, the sslmode for each client, and the documentation pages and sources you checked. Include the date of each check, since PostgreSQL release and support information changes over time. The step is complete when another engineer can repeat the tests from this record. This record is the evidence a security reviewer will ask for, and it should be updated whenever a server, client or OpenSSL build changes.

Where the ssl_groups setting acts in a PostgreSQL TLS handshake

The diagram starts with a libpq client opening a connection and sending a TLS 1.3 ClientHello that lists the key exchange groups it accepts. The PostgreSQL server passes its ssl_groups value to OpenSSL, which picks the group used for key exchange; this is the only step the setting affects. The server certificate is then checked on the client according to sslmode, a separate step covering signatures and certificate chains, so ssl_groups does not change it. The documented default, X25519:prime256v1, contains no post-quantum group, so a hybrid group such as X25519MLKEM768 appears only if the setting names it and the linked OpenSSL build supports it.

The ssl_groups setting affects only the key exchange group selection step.

What the PostgreSQL project has not published about post-quantum TLS

The PostgreSQL documentation and release notes checked on 2026-12-03 describe no post-quantum feature, client setting or build requirement. What exists is a single mailing list thread showing a hybrid group working through OpenSSL, and the questions below are the gaps to put to the project or to your distribution or managed service provider.

No post-quantum roadmap published

The PostgreSQL 18 and 19 release notes, checked on 2026-12-03, do not mention post-quantum cryptography, ML-KEM, ML-DSA or SLH-DSA. The project has published no roadmap item or deprecation plan for classical key exchange that we could find. Ask the project or your provider whether a post-quantum item is planned, which release it targets, and whether it will arrive in the server, in libpq, or only through OpenSSL. Until an answer is in writing, treat post-quantum TLS in PostgreSQL as unscheduled.

PG 19 release notes

No client-side groups parameter

The libpq connection parameters page, checked on 2026-12-03, documents no client-side setting for choosing key exchange groups. The server-side ssl_groups setting controls which groups the server offers, but a client cannot request a post-quantum group through PostgreSQL's own options. Ask whether the project plans a libpq parameter, and whether clients rely on the TLS library's defaults. Test the connection path from a real client rather than assuming the server setting is enough.

libpq connection parameters

No list of supported OpenSSL groups

The documentation passes ssl_groups to OpenSSL and does not say which named groups work with which OpenSSL versions. The one worked example in the mailing list uses OpenSSL 3.5 with a hybrid group name, but there is no published matrix. Ask the project for the minimum OpenSSL version per group, and ask your distribution whether its OpenSSL build includes the group you need before you set ssl_groups to it.

Hackers thread, 2026-02-19

Backporting ssl_groups to older versions

The 2026-02-19 mailing list message says PostgreSQL versions before 18 rejected the ML-KEM group name because ssl_ecdh_curve did not accept it, and asks whether the change could be backported. The thread text we could read contains no committer answer. Do not assume the change will reach 17 or earlier. Ask the project directly, and if you run an older major version, ask your provider whether they will backport it.

Hackers thread

No post-quantum signature or certificate option

The server and libpq documentation checked on 2026-12-03 describe no post-quantum signature or certificate option. Server certificates are loaded from ssl_cert_file and ssl_key_file, and the documentation states no restriction on key type beyond matching the certificate. Whether a post-quantum certificate loads depends on OpenSSL and your certificate authority, not on a PostgreSQL setting. Ask the project whether certificate or signature support is planned, and confirm with your certificate authority what it issues.

SSL and TCP docs

How distribution builds set ssl_groups

The default ssl_groups value documented for PostgreSQL 19 is X25519:prime256v1, and it contains no post-quantum group. Packages from Linux distributions, container images and managed services may change this default or the OpenSSL they link against. Ask each provider what ssl_groups defaults to in their build, which OpenSSL version it links, and whether they support a hybrid group, before you plan a configuration.

Connection settings, 19

What breaks or silently stays classical when ssl_groups is changed

Changing ssl_groups on a PostgreSQL server does not change the certificates or signatures that authenticate the server, so a server certificate and key that are classical today remain classical after the change. The setting only controls which named groups the server offers for TLS key exchange, and the documented default, X25519:prime256v1, contains no post-quantum group. A server left unchanged therefore stays classical, and nothing in the release notes or current documentation reports a post-quantum default. Before changing anything, confirm with SHOW ssl_groups; what the running server uses, and check that the certificate and key in ssl_cert_file and ssl_key_file are still the ones you expect.

A group name the linked OpenSSL build does not recognize is the most likely way to break a change. The documentation facts do not say whether PostgreSQL refuses to start or only fails TLS negotiation, so test it in a staging environment with the exact OpenSSL build that ships with your server, and read the server log after a restart. The hackers thread shows that PostgreSQL 18 negotiated the hybrid group X25519MLKEM768 with OpenSSL 3.5, and that earlier versions rejected the same name through ssl_ecdh_curve, so the outcome depends on both the PostgreSQL version and the OpenSSL version. Also note that setting X25519 is not permitted when OpenSSL runs in FIPS mode, so a FIPS-mode server needs a different list.

Clients fall back silently. A client whose TLS library does not offer the configured group will negotiate a classical group instead, and the connection still succeeds. PostgreSQL 19 also adds PGDATA/pg_hosts.conf for server-side SNI, which sets certificate and key pairs per hostname, and the ssl_groups setting does not govern those per-hostname entries. Review that file separately, and confirm which key type each hostname uses. Test with a client built against the same library you plan to use in production, and confirm the negotiated group from the client side rather than assuming it from the server setting.

Questions engineers and vendor-risk reviewers ask about PostgreSQL post-quantum TLS

Is PostgreSQL quantum safe?

PostgreSQL does not have a documented post-quantum feature, so it cannot be described as quantum safe. PostgreSQL 18 and 19 documentation and release notes, checked on 2026-12-03, do not mention ML-KEM, ML-DSA or SLH-DSA, and the default ssl_groups value of X25519:prime256v1 contains no post-quantum group. A hybrid key exchange is possible in practice: a February 2026 pgsql-hackers message shows PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating the hybrid group over TLS 1.3 with OpenSSL 3.5. That is a configuration you can test, not a supported product feature. Confirm the behavior in your own build before relying on it.

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

PostgreSQL 18 or later, linked against an OpenSSL build that supports the hybrid group, is the version the February 2026 thread used. Earlier versions could not do this because ssl_ecdh_curve rejected the ML-KEM group name, and PostgreSQL 18 renamed that setting to ssl_groups and allowed several colon-separated groups. The thread asks whether the change could be backported, and the text checked contains no committer answer, so do not assume a backport exists. PostgreSQL 18 is listed as supported on the versioning page as of 2026-12-03, and PostgreSQL 14 is no longer supported. Also confirm your OpenSSL version and that it exposes the group name you set.

Does enabling post-quantum TLS on PostgreSQL cost extra?

The documentation checked gives no price for this work, and the cost depends on your upgrade path and your team's time. Costs usually fall into three groups: upgrading to PostgreSQL 18 or later where you are on an older major version, updating OpenSSL in the server and every client, and testing connections through drivers and poolers. Most of this is one-time, while ongoing costs come from keeping OpenSSL and PostgreSQL patched. Ask any vendor or consultant for a written scope that separates test, rollout and recurring maintenance, and confirm with your database vendor whether any support contract changes.

What could break when I change PostgreSQL TLS settings?

Changing ssl_groups or the OpenSSL library can break connections from clients that do not offer the same key exchange groups. Check every client, driver, connection pooler and proxy in the path, since each one negotiates TLS with its own OpenSSL build. Keep ssl_groups on a classic group as a fallback while you test, and do not enable X25519 restrictions in FIPS mode, because the documentation says X25519 is not allowed there. The risks section of this page covers these failure modes in more detail.

What should I ask my PostgreSQL vendor about post-quantum support?

Ask whether the vendor has a documented post-quantum key exchange or signature feature for your edition, and which OpenSSL version and group names it supports. Ask whether any hybrid group is tested and supported in production or only usable as an unsupported configuration. Ask for the date of the last public statement on post-quantum cryptography and for its roadmap, if one exists. The gaps section of this page lists the points the public documentation does not answer.

Can my team enable post-quantum TLS on PostgreSQL alone?

Yes, for a test in a non-production environment. Your team can build PostgreSQL 18 or later against OpenSSL 3.5 or another build that supports the hybrid group, set ssl_groups, and check the negotiated group with a client. A readiness review or a production migration may need outside help, particularly where many clients, poolers or FIPS-mode systems are involved, or where compliance evidence is required. If you bring in a partner, get the scope, deliverables and timeline in writing before work starts.

Does post-quantum TLS on PostgreSQL also cover certificates or stored data?

No. Enabling a hybrid key exchange for connections does not change server or client certificates, which are still loaded from ssl_cert_file, ssl_key_file and ssl_ca_file, and it does not change stored data. The documentation checked describes no PostgreSQL feature for post-quantum certificates. Encryption of data at rest is covered by the operating system or the pgcrypto extension, and backups are covered on their own pages of this section. Assess each of those separately.

How DeployOpen helps plan and test PostgreSQL post-quantum TLS changes

DeployOpen helps platform and database teams find out what their PostgreSQL connections need before any change is made. We scope the work against the server, client library and build options in your environment, then test and document each setting that the PostgreSQL documentation names. Where the documentation names no post-quantum setting for a component, we say so and record what to confirm with the vendor.

How we scope

  • We list the PostgreSQL versions, OpenSSL builds and client libraries in use, since the documented ssl_groups setting depends on the linked OpenSSL.
  • We map every connection path, including replication, pg_basebackup and poolers, so the written scope names each one that needs review.
  • Fixed-scope agreements define which servers, clients and environments are covered, with deliverables and timelines confirmed in writing before work starts.

How we build

  • We test ssl_groups values against the OpenSSL build in a staging environment, recording which group names the handshake actually negotiates.
  • We review sslmode, channel_binding and certificate verification on each client, since prefer is kept only for backward compatibility.
  • We check pg_hba.conf and password settings, including scram-sha-256 and the deprecated md5 type, alongside any TLS change.

How we hand over

  • Deliverables include a dated inventory of each connection setting, its current value and the component version it applies to.
  • We document which PostgreSQL and libpq behaviors were confirmed by testing and which rely on vendor documentation or release notes.
  • Handover notes list open questions for the vendor, such as whether any post-quantum group will be supported in a given release.

How we support

  • Ongoing support is available as a retainer for upgrades, configuration changes and retesting after each PostgreSQL minor release.
  • We can retest the connection path when OpenSSL, the client libraries or PostgreSQL versions change, keeping the inventory current.
  • Support scope, response expectations and fees are agreed in writing, and DeployOpen does not issue audit reports or certifications.

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.