Can PostgreSQL negotiate post-quantum TLS today, and what does it depend on?
PostgreSQL has no post-quantum feature of its own, and it cannot negotiate hybrid ML-KEM key exchange unless the server is built against an OpenSSL release that offers the group and the ssl_groups setting names it. The thread on the pgsql-hackers list dated 2026-02-19 by Dmitry Dolgov shows a working case: PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1, negotiating the hybrid group X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5. As of the 2026-12-03 check, the PostgreSQL 18 and 19 release notes and the current server and libpq documentation do not mention post-quantum algorithms, ML-KEM, ML-DSA or SLH-DSA, and the vendor has published no support statement in the facts available. Plan on the assumption that this capability comes from the OpenSSL build, not from PostgreSQL.
The default for ssl_groups in PostgreSQL 19 is X25519:prime256v1, which contains no post-quantum group, so a stock configuration will not offer one even on a capable OpenSSL. The setting is passed to OpenSSL's SSL_CTX_set1_groups_list, which means the group name must be one the linked OpenSSL library recognizes. The PostgreSQL 18 release notes say ssl_ecdh_curve was renamed to ssl_groups to allow multiple colon-separated groups, and the thread reports that PostgreSQL versions before 18 rejected the ML-KEM name because of the older ssl_ecdh_curve setting. Engineers who maintain PostgreSQL 17 or older should not expect the same result without a backport, and the thread text contains no committer answer on whether one is planned.
Before changing anything, confirm three things in your own environment: the OpenSSL version the server binary links against (not only the one installed on the build host), whether the packaging for your distribution builds PostgreSQL against that version, and whether OPENSSL_CONF redirects the system openssl.cnf in your service units. Then confirm that the client side can complete the handshake, because the libpq connection parameters page documents no client-side groups setting, so the client's own OpenSSL build determines what it can offer. A server that negotiates a hybrid group with one client and falls back with another is a result to record in your inventory, not a success criterion. Treat any vendor or distribution statement that PostgreSQL supports post-quantum TLS as something to verify against the linked OpenSSL build and the documents listed above.
Which PostgreSQL versions and settings apply to post-quantum TLS
This table lists the PostgreSQL server settings, OpenSSL requirements and libpq behavior that govern TLS key exchange groups, with the source date for each row. Read each row against the version you run, since the ssl_groups name and the OpenSSL floor differ between PostgreSQL 18 and 19. The main takeaway is that the documented defaults contain no post-quantum group, so a hybrid group only applies when you set it and your OpenSSL build supports it.
| Setting or component | PostgreSQL 18 and 19 requirement | Source and date |
|---|---|---|
| ssl_groups | Colon-separated named groups for TLS key exchange. Default is X25519:prime256v1 in PostgreSQL 19. The documented default has no post-quantum group. | PG 19 connection settings, checked 2026-12-03 |
| ssl_ecdh_curve | Renamed to ssl_groups in PostgreSQL 18. The old name still works but accepts only one curve. | PG 18 release notes, released 2025-09-25 |
| ssl_tls13_ciphers | Added in PostgreSQL 18. Governs TLS 1.3 cipher suites. Blank uses OpenSSL's built-in suites. | PG 18 release notes; PG 19 connection settings, checked 2026-12-03 |
| ssl_min_protocol_version | Defaults to TLSv1.2 in PostgreSQL 19. SSL versions 2 and 3 are always disabled. | PG 19 connection settings, checked 2026-12-03 |
| OpenSSL version | Example in the hackers thread used OpenSSL 3.5 with PostgreSQL 18 to negotiate X25519MLKEM768. Support for OpenSSL versions older than 1.1.1 was removed in PostgreSQL 18. | PG hackers thread, 2026-02-19; PG 18 release notes |
| libpq client | No groups parameter is documented. Client-side key exchange groups have no PostgreSQL-specific setting, so confirm group behavior in the OpenSSL configuration the client uses. | PG libpq connection parameters, checked 2026-12-03 |
| PostgreSQL 14 and earlier | Could not negotiate the ML-KEM group name because ssl_ecdh_curve rejected it. The hackers thread asks about backporting, and no committer answer appears in the text reviewed. | PG hackers thread, 2026-02-19 |
Which parts of the build and server the key exchange depends on
Post-quantum key exchange in PostgreSQL is not a single switch. It depends on the OpenSSL library the server is linked against, the ssl_groups setting that picks which named groups the server offers, the system OpenSSL configuration file, and whether OpenSSL runs in FIPS mode. The cards below cover each part and what to check.
OpenSSL linked at build time
PostgreSQL does not provide its own TLS code. It relies on the OpenSSL library it is built and linked against, so the OpenSSL version on the build host or in the package determines which key exchange groups the server can offer at all. The thread's example used PostgreSQL 18 with OpenSSL 3.5 to negotiate the hybrid group X25519MLKEM768. Check the OpenSSL version your PostgreSQL package or build actually links, because a group name the library does not know cannot be negotiated.
SSL docsssl_groups server setting
The ssl_groups setting is passed to OpenSSL's SSL_CTX_set1_groups_list and sets the named groups for TLS key exchange as a colon-separated list. Its documented default is X25519:prime256v1, which contains no post-quantum group. In PostgreSQL 18 the setting was renamed from ssl_ecdh_curve, and the older name still works. Any post-quantum group must be named here explicitly, and PostgreSQL versions before 18 rejected the ML-KEM group name under the older setting.
Connection settingsOPENSSL_CONF system configuration
PostgreSQL reads the system-wide openssl.cnf file, which can be redirected with the OPENSSL_CONF environment variable. Settings in that file can change which groups and protocol options OpenSSL applies, so the server may behave differently from the same build on another host. Confirm which configuration file the PostgreSQL service process reads, especially under a service manager or container that sets its own environment.
SSL docsFIPS mode disallows X25519
The ssl_groups documentation states that X25519 is not allowed when OpenSSL is in FIPS mode. A default configuration that offers X25519 first will therefore need a different group list on FIPS-enabled hosts. The same mode also affects pgcrypto, whose builtin_crypto_enabled setting can be set to fips and where fips_mode() reports the current state. Check FIPS status on each host separately from the build.
Connection settingslibpq client key exchange
The libpq client library uses the OpenSSL it is linked with for the client side of the TLS handshake, so client applications built on it inherit that library's group support. The libpq connection parameters documentation lists no client-side groups parameter, so there is no PostgreSQL-specific setting on the client to choose key exchange groups. Test each client application against the target server build, because the negotiated group is set by both ends.
libpq parametersWhich build and configuration checks to run before enabling hybrid key exchange
This sequence confirms that the PostgreSQL server, the OpenSSL build it links to, and the client libraries in the connection path can all negotiate a hybrid post-quantum key exchange group before anyone changes ssl_groups in production. Each step ends with a check whose result tells you whether to continue.
Record the PostgreSQL and OpenSSL versions
The engineer who builds or packages the server records the PostgreSQL major and minor version, then runs the server's build or version output to identify the OpenSSL library it links against. Confirm the OpenSSL version from the same binary or package that runs in production, not from a separate installation on the build host. The step is closed when both versions are written into the change record and match the running environment. PostgreSQL 18 and later are the releases the documentation and the public test report describe for this setting, so note any older major version as outside that path.
Confirm the OpenSSL build supports the hybrid group
Using the OpenSSL version recorded in the previous step, the engineer checks whether that build offers the hybrid group X25519MLKEM768 by listing the groups the library supports, for example with the openssl list command for supported groups. The public test report cited in the facts used OpenSSL 3.5 with PostgreSQL 18, so treat that combination as the one reported to work and confirm your own build independently. The step is closed when the group name appears in the library's supported group list. If it does not appear, do not proceed to ssl_groups changes, because PostgreSQL passes the name through to OpenSSL and the connection cannot negotiate it.
Check that FIPS mode is not in use
The security engineer confirms whether the OpenSSL installation runs in FIPS mode on the server and on any client that uses it. The PostgreSQL documentation states that X25519 is not allowed when OpenSSL is in FIPS mode, and the pgcrypto fips_mode() function reports the mode from inside the database. Run fips_mode() from a session and check the OpenSSL configuration for FIPS enablement on the host. The step is closed when you have a documented answer for each host. If FIPS mode is enabled, the default group list cannot be used as written, and the group plan needs a separate review with the vendor or the compliance owner before any change.
Set ssl_groups deliberately on a test server
On a non-production PostgreSQL instance, the administrator sets ssl_groups to a colon-separated list that puts the hybrid group first, for example X25519MLKEM768 followed by X25519 and prime256v1, so that clients which do not support the hybrid group still negotiate an existing group. The default in the current documentation is X25519:prime256v1 and contains no post-quantum group, so the change must be made explicitly in postgresql.conf or with ALTER SYSTEM and a configuration reload. The step is closed when the server starts or reloads without error in the log and SHOW ssl_groups returns the intended value. Record the exact string used so the test can be repeated.
Test the negotiated group with a real client
Connect to the test server with a real client, using the same libpq or driver version that applications use, and set sslmode to verify-full so the test also checks the certificate chain and host name. Then confirm which group was negotiated. The facts do not name a PostgreSQL view for the negotiated group, so the engineer should use a client-side or OpenSSL-level trace, such as an openssl s_client handshake against the server with the same group list, to see the group the handshake actually selected. The step is closed when the handshake output shows X25519MLKEM768 as the negotiated group for that client. Repeat the test with an older client to confirm the fallback group is chosen rather than a failed connection.
Confirm client libraries use an OpenSSL build with the group
Every client library in the connection path, including the libpq build behind each application, poolers, and proxies, must link to an OpenSSL build that supports the same group. The engineer checks the OpenSSL version each client binary or container image uses, typically with ldd or the package manager, and runs the supported-group check from the second step against that build. The libpq documentation gives no client-side setting for key exchange groups, so the group negotiated depends on what the client library's OpenSSL offers. The step is closed when every client in the path shows the group in its handshake or in its build's supported list. Any client that does not is recorded as a gap for the migration plan.
How the requirements differ for PostgreSQL 18, PostgreSQL 19 and older releases
PostgreSQL 18 is the first release line where the key exchange group list is set with ssl_groups. The 18 release notes say ssl_ecdh_curve was renamed to ssl_groups so that several colon-separated groups can be listed, and the old name still works. The default was changed to include X25519, and the ssl_tls13_ciphers setting was added. In a February 2026 pgsql-hackers message, Dmitry Dolgov showed PostgreSQL 18 with ssl_groups set to X25519MLKEM768:X25519:prime256v1 negotiating the hybrid group X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5. The release notes for 18 do not mention post-quantum cryptography, so this behavior depends on the linked OpenSSL build rather than on a documented PostgreSQL feature.
- Setting name: use
ssl_groups. The olderssl_ecdh_curvename still works in 18 but is the one that rejected the ML-KEM group name in earlier releases. - Group list: the value is a colon-separated list passed to OpenSSL's group configuration, so the hybrid group must come first if you want it preferred.
- OpenSSL dependency: the group must exist in the OpenSSL build the server links against. The thread used OpenSSL 3.5.
- Support status: the PG Versioning page lists 18.7, first released September 25, 2025, as supported as of 2026-12-03.
- Old OpenSSL: support for OpenSSL versions older than 1.1.1 was removed in 18.
Before relying on this, confirm the exact OpenSSL version in your build and test the handshake in your own environment, because the thread is a single report and not a documented configuration.
PostgreSQL 19 keeps ssl_groups and documents its default as X25519:prime256v1. That default contains no post-quantum group. The documentation also states that X25519 is not allowed when OpenSSL runs in FIPS mode, so a FIPS deployment needs a different group list. The 19 release notes and the current server and libpq documentation, as checked on 2026-12-03, do not mention post-quantum cryptography, ML-KEM, ML-DSA or SLH-DSA. Any hybrid group use therefore depends on setting ssl_groups to a name the linked OpenSSL build supports. PostgreSQL 19.0 was first released November 19, 2026.
- Current default:
ssl_groupsdefaults toX25519:prime256v1, with no post-quantum group. - FIPS restriction: X25519 is documented as not allowed when OpenSSL is in FIPS mode, so the list must change in a FIPS build.
- Certificate keys: the documentation states no restriction on certificate key type, only that the key must match the certificate. Certificate and key files are set by
ssl_cert_fileandssl_key_file. - Protocol floor:
ssl_min_protocol_versiondefaults to TLSv1.2, and SSL versions 2 and 3 are always disabled. - Server SNI: 19 adds a
pg_hosts.conffile in PGDATA for hostname and key pairs.
Confirm the group list against your OpenSSL and FIPS policy, and check the 19 release notes again before any change, since the current documentation may be updated.
Releases before 18 used ssl_ecdh_curve for key exchange groups. The February 2026 pgsql-hackers thread reports that this setting rejected the ML-KEM group name, so hybrid groups could not be configured there. The same message asks whether the change could be backported to earlier versions, and the thread text read for this page contains no committer answer on that question. Treat backporting as unconfirmed. The PG Versioning page lists 14 as no longer supported, so any installation on 14 or older needs an upgrade path before post-quantum TLS planning can start on a supported line.
- Setting name:
ssl_ecdh_curverejected the ML-KEM group name in the reported test. - Backport status: the thread asks about backporting, and no answer appears in the text read.
- Unsupported lines: version 14 is listed as no longer supported on the PG Versioning page as of 2026-12-03.
- Upgrade effect: moving to 18 or 19 changes the setting name and defaults, so configuration files need review during any major upgrade.
- Supported lines: the PG Versioning page lists 18 and 19 as supported.
Ask your PostgreSQL support provider or the project's mailing lists for a current answer on backporting, and check the release notes for any minor release before assuming the older line gains this capability.
How the server's TLS handshake chooses a key exchange group
The diagram follows one TLS 1.3 connection from the client's ClientHello to the negotiated key exchange. The client offers its supported groups, and the PostgreSQL server, which passes its ssl_groups list to OpenSSL through SSL_CTX_set1_groups_list, selects the group both sides share. A hybrid group such as X25519MLKEM768 is chosen only when the server lists it, the linked OpenSSL build supports it, and the client offers it. The default ssl_groups value, X25519:prime256v1, contains no post-quantum group, so check the configured value and the OpenSSL version before assuming any post-quantum key exchange.
Server ssl_groups and client offers determine the negotiated TLS 1.3 key exchange group.
What PostgreSQL has not published about post-quantum TLS
The documentation checked on 2026-12-03 covers TLS settings, client libraries and OpenSSL integration, but it does not describe a post-quantum feature. The gaps below are the points where a planner needs a written answer from the PostgreSQL project or a distribution before committing to an upgrade, and each card names what to ask.
No published post-quantum roadmap
The PostgreSQL 18 and 19 release notes and the current server and libpq documentation, checked on 2026-12-03, contain no statement of a post-quantum roadmap, and they do not mention ML-KEM, ML-DSA or SLH-DSA. The project does publish a versioning policy, and its support windows are the only dated commitments in the material reviewed. Ask the project or your distributor whether a post-quantum plan exists, which version it targets, and whether it will appear in release notes or a dedicated transition guide before you rely on it.
Versioning policyNo client-side group selection in libpq
On the server, ssl_groups chooses the named groups for TLS key exchange, with a default of X25519:prime256v1. The libpq connection parameters page documents no matching client-side setting, so a client has no PostgreSQL-specific way to pick key exchange groups. Any client-side choice depends on the TLS library the client was built against. Ask the project whether a client parameter is planned, and ask each driver maintainer how their build chooses groups, because a connection will only negotiate a group that both ends support.
libpq parametersNo answer on backporting ML-KEM
A message on the pgsql-hackers list dated 2026-02-19 shows PostgreSQL 18 negotiating the hybrid group X25519MLKEM768 over TLS 1.3 with OpenSSL 3.5, when ssl_groups includes that name. The same message says versions before 18 rejected the name because ssl_ecdh_curve did not accept it, and asks whether the change could be backported. The text reviewed contains no committer answer. Ask the project whether backporting is planned or ruled out, because this decides whether supported versions before 18 can reach hybrid key exchange at all.
Hackers threadNo documented post-quantum signatures or certificates
The documentation describes server and client certificates loaded from ssl_cert_file, ssl_key_file and ssl_ca_file, and it states that the key must match the certificate. It names no restriction on key type and no post-quantum signature or certificate format. Certificates, client authentication through the cert method, and CRL checks all work with whatever the OpenSSL build accepts, which is not the same as a documented PostgreSQL feature. Ask the project whether post-quantum signatures are supported for server certificates, client certificates and pg_hba.conf authentication, and which OpenSSL versions were tested.
SSL TCP docsAsk which build options and OpenSSL versions
The server uses OpenSSL for all TLS, and PostgreSQL 18 removed support for OpenSSL versions older than 1.1.1. Whether a given build can use a hybrid group depends on the OpenSSL version it links against, not only on the PostgreSQL version. Packagers and distributions compile PostgreSQL against their own OpenSSL, so the same server release can differ across platforms. Ask the project and each distributor which OpenSSL version a build ships with, and whether they will confirm group support on that version before you change ssl_groups in production.
OpenSSL in SSL docsWhat can go wrong when enabling hybrid key exchange
Enabling hybrid key exchange in PostgreSQL is a configuration change that can fail in ways that are easy to miss, so check the outcome of each change rather than assuming it took effect. The ssl_groups setting passes its colon-separated list to OpenSSL, and an unsupported group name can make the setting fail or the handshake fail, instead of falling back quietly to a group the server does support. Confirm the server starts, then confirm the negotiated group on a real connection. The PostgreSQL 19 documentation and the February 2026 pgsql-hackers thread both show that the name X25519MLKEM768 only works when the linked OpenSSL build supports it, and the thread reports that PostgreSQL 18 with OpenSSL 3.5 negotiated it. Confirm the group your own build supports before you rely on it.
Negotiation is a two-sided outcome, and the server cannot force a client to use a hybrid group it does not offer. If a client does not support the group, the connection can complete with a classical group instead, and nothing in the server's configuration will show that a classical group was chosen. The current libpq connection parameters page documents no client-side setting for key exchange groups, so the client's OpenSSL build and its own defaults decide what it offers. Test with each client type that connects to the server, including drivers, poolers and proxies, and record the group each one actually negotiates. A server that lists a hybrid group first tells you nothing about what a particular client will use.
Two other settings can change the result without anyone editing ssl_groups. In FIPS mode, OpenSSL does not allow X25519, so the default X25519:prime256v1 list must be changed for that environment, and the documentation says so directly. Separately, PostgreSQL reads the system-wide openssl.cnf, and the OPENSSL_CONF environment variable can point it at a different file, which can change which OpenSSL settings apply to the server process. Check the environment the server process starts with, not only the PostgreSQL configuration file. Because ssl_groups defaults to a classical list containing no post-quantum group, the key exchange stays classical until someone changes the setting, and an upgrade alone does not change it.
Common questions about PostgreSQL post-quantum TLS requirements
Is PostgreSQL quantum safe?
The honest answer is that PostgreSQL has no documented post-quantum feature, so the word quantum safe is not a claim you can make about it. The PostgreSQL 18 and 19 release notes and the current server and libpq documentation, checked on 2026-12-03, do not mention ML-KEM, ML-DSA or SLH-DSA. What is supported is a path that depends on the library underneath: a hybrid group such as X25519MLKEM768 can be negotiated when PostgreSQL is built against a suitable OpenSSL and the server setting ssl_groups names that group. A developer thread dated 2026-02-19 shows this working on PostgreSQL 18 with OpenSSL 3.5. Treat that as a demonstration, not a supported configuration, and confirm the details with your own build and test environment.
Which PostgreSQL version and OpenSSL version do I need?
PostgreSQL does not provide its own TLS code, so the OpenSSL build it links against determines which key exchange groups are available. The only version pairing supplied in the research is PostgreSQL 18 with OpenSSL 3.5, which is the combination in the 2026-02-19 developer thread. Earlier PostgreSQL versions could not set the ML-KEM group name because the older ssl_ecdh_curve setting rejected it, and the thread asks whether this change could be backported without a committer answer. PostgreSQL 18 also removed support for OpenSSL versions older than 1.1.1. Confirm the exact OpenSSL version your packages link against, because the distribution build may differ from the upstream one. PostgreSQL 19 supports the newer setting, but that alone does not establish a hybrid group is available.
Is changing the ssl_groups setting alone enough?
No. Setting ssl_groups only tells PostgreSQL which group names to offer, and it only works if the linked OpenSSL build supports that group. The default in PostgreSQL 19 is X25519:prime256v1, which contains no post-quantum group, so the server does not negotiate one unless you change it. Setting the name also does not cover the other parts of the connection. Certificates, client libraries and the connection path through poolers or proxies must also support the group, and clients connect with libpq, which has no documented groups parameter. Confirm each client's TLS library before assuming the server setting is effective for that client.
Does post-quantum TLS change my certificates or passwords?
The documentation and research supplied do not establish that enabling a post-quantum key exchange group changes server certificates, private keys, client certificates or stored passwords. The key exchange group negotiated during the TLS handshake is separate from the certificate that authenticates the server. Password storage is controlled by password_encryption, which defaults to scram-sha-256 in the current documentation, and nothing in the supplied facts ties a key exchange change to that setting. Confirm with your own tests that existing certificates and scram-sha-256 logins continue to work after a change, and do not assume a certificate reissue is required or unnecessary without checking.
Will this cost extra, and what drives the cost?
The research supplied includes no price or licensing figure for PostgreSQL post-quantum TLS, so this page cannot give an amount. PostgreSQL is open source, and the cost you will see usually comes from work rather than a product fee. Cost drivers include the time to rebuild or upgrade PostgreSQL against a newer OpenSSL, testing each client driver, pooler and proxy in the connection path, and any cloud or managed service that hides the build from you. One-time costs are testing and rollout. Recurring costs are patching and keeping the OpenSSL and client libraries current. When requesting a quote, ask what is included, which versions are covered, and who maintains the build.
What should I ask my PostgreSQL vendor about TLS requirements?
Ask the vendor or packager these points in writing:
- Which PostgreSQL version and which OpenSSL version the build links against, and whether post-quantum hybrid groups are compiled in.
- Whether ssl_groups can name a hybrid group such as X25519MLKEM768 in their build, and what the default is.
- Which client libraries and drivers they support for that group, and whether a connection pooler or proxy they ship supports it.
- Whether they have published any roadmap or notice on post-quantum TLS, and when.
- Who fixes the build when OpenSSL releases a change, and what their support window is.
The PostgreSQL Versioning page lists supported releases, so check that the version you run is still within its support period.
Can my team do the post-quantum TLS work ourselves?
Yes, if your team can build PostgreSQL from source or maintain a package build, and can test client connections. The steps are to confirm an OpenSSL version that supports the group you need, build or install PostgreSQL against it, set ssl_groups, and then test each client and any pooler or proxy in the path. The PostgreSQL SSL and connection documentation covers the settings involved. Teams without build capacity or with many drivers often choose help with the build, testing and rollout, which DeployOpen provides as fixed-scope work with the scope agreed in writing before starting.
How DeployOpen helps plan and test PostgreSQL post-quantum TLS
PostgreSQL leaves TLS to OpenSSL, so the library version and build decide what key exchange is possible. DeployOpen starts by confirming which OpenSSL your PostgreSQL builds link against, then plans and tests the library and configuration work needed before any post-quantum group is set in ssl_groups.
How we scope
- Confirm the PostgreSQL major versions in use and whether each is still supported under the project's 5-year policy.
- Record the OpenSSL version each server and client build links against, including any distribution-packaged builds.
- Agree the written scope in advance, covering which servers, clients and libraries are included and what evidence is delivered.
How we build
- Test a non-production PostgreSQL build against a candidate OpenSSL version and check the negotiated group over TLS 1.3.
- Review the ssl_groups, ssl_min_protocol_version and ssl_tls13_ciphers settings against the group names the linked OpenSSL supports.
- Verify client and driver behavior with libpq sslmode set to verify-full, since prefer is kept only for backward compatibility.
How we hand over
- Deliver a written inventory of OpenSSL versions, build options and PostgreSQL settings tested, with the exact versions recorded.
- Document the configuration changes and the test results, so your engineers can repeat the negotiation check on their own systems.
- Note what the documentation does not state, such as whether PostgreSQL 18 and 19 offer any post-quantum feature beyond the ssl_groups setting.
How we support
- Ongoing support and upgrade testing are available as a retainer, covering new PostgreSQL and OpenSSL releases as they ship.
- Retesting after OpenSSL or PostgreSQL upgrades, so changes to supported group names are caught before production rollout.
- Continued review of vendor and project statements, so the inventory reflects what is documented as of each retest date.

