Does Python support post-quantum cryptography?

Python 3.15 adds SSLContext.set_groups() for post-quantum key agreement groups, but the ssl module documents no post-quantum certificates or signatures. Check your interpreter's OpenSSL build and the date of each source before you record an answer.

On this page

Does Python support post-quantum cryptography today, and for which connections?

If an inventory, questionnaire or approval asks whether Python supports post-quantum cryptography, the answer must be split by connection type. For key exchange, Python 3.15, released 9 October 2026, adds SSLContext.set_groups() for post-quantum key agreement groups. For signatures and certificates, the ssl module documents no post-quantum certificate or signature algorithm, so the accurate entry for that row is that the ssl module documents none. Key exchange also depends on the OpenSSL build the interpreter links: SSLContext.get_groups() requires OpenSSL 3.5 or later, and SSLSocket.group() requires OpenSSL 3.2 or later. The details are on the Python 3.15 What's New page.

Python 3.14 and earlier have no set_groups(), so a key exchange answer for those releases cannot come from that method. Before 3.15, the ssl documentation points to set_ecdh_curve(), which covers ECDH curves and does not apply to client sockets. The cryptography package is a separate matter: it offers ML-KEM keys (MLKEM768 and MLKEM1024) and ML-DSA keys (MLDSA44, MLDSA65 and MLDSA87) as its own key classes, available in wheels from cryptography 48.0.0 when OpenSSL 3.5.0 or later is used. A pip-installed wheel carries its own bundled OpenSSL, which can differ from the one the ssl module uses, so a working ML-KEM or ML-DSA call in cryptography does not show what a Python TLS connection negotiates.

For the inventory row, record the Python version and the OpenSSL version separately. Run python3 -VV to get the interpreter version, and check the OpenSSL version the ssl module reports through ssl.OPENSSL_VERSION. If that version is below 3.5, get_groups() is not available on that build, so a post-quantum key exchange claim cannot be checked there. Confirm with your build team or distribution whether the Python binary you run links a qualifying OpenSSL, because this page does not cover distribution builds. This page covers status only. Enablement, upgrade needs and the project's published roadmap are on the sibling pages, and the status of any given build can change when that build is updated.

Which Python versions support post-quantum key exchange and signatures

This table compares Python's ssl module, its 3.15.1 installers and the cryptography package by post-quantum key exchange, post-quantum signatures and default setting. Read each row by the component that does the work: the ssl module negotiates TLS key agreement through OpenSSL, while cryptography exposes its own bundled OpenSSL classes. The main takeaway is that Python 3.15 adds set_groups() for post-quantum groups in key exchange, but no post-quantum signature support is documented for the ssl module and no edition or license terms are given for CPython.

Release line or componentPost-quantum key exchangePost-quantum signatures or certificatesDefault setting, edition and license
Python 3.15 ssl module (What's New, checked 2026-12-03)set_groups() accepts post-quantum groups; get_groups() needs OpenSSL 3.5 or laterSignature restriction methods added; no post-quantum signature support documented for sslSet in code with set_groups(); default not stated. Edition or license: not documented for CPython
Python 3.14 and earlier ssl moduleset_ecdh_curve() only, which does not apply to client sockets; no post-quantum group option documentedNot documented for ssl; signature restriction methods arrive in 3.15Set in code with set_ecdh_curve(). Edition or license: not documented for CPython.
Python 3.15.1 installers (Oct. 21, 2026 release page)Depends on bundled OpenSSL: Windows 3.5.8 (tracker, August 2026 update); macOS 3.5.9 (PR merged 2026-09-30)OpenSSL 3.5 adds ML-DSA; Python's use of it for certificates is not statedDefault not stated; edition or license not documented. Release page dated Oct. 21, 2026
cryptography 51.0.0 (2026-12-01)MLKEM768 and MLKEM1024 classes (FIPS 203 ML-KEM); changelog shows no X25519MLKEM768 entryMLDSA44, MLDSA65 and MLDSA87 classes (FIPS 204 ML-DSA); X.509 signing since 49.0.0Opt-in through code. Edition or license: not stated in this entry; confirm with the package.

Which post-quantum algorithms Python reaches through ssl and cryptography

Python reaches post-quantum algorithms through two separate routes. The ssl module uses the OpenSSL build it is linked against for TLS key agreement, while the cryptography package uses its own bundled OpenSSL for application-level keys, certificates and signatures. Check each interface below against the component named on its card, because a result on one route says nothing about the other.

Hybrid key agreement in ssl

OpenSSL 3.5.0 changed its default TLS key shares to offer X25519MLKEM768 and X25519, so an ssl context on that build may offer a hybrid post-quantum key share by default. This applies to the ssl module only if the OpenSSL build it is linked against reaches the Python context. Confirm it on your system by calling get_groups() to list the available groups, then calling SSLSocket.group() on a live connection to see the group used for key agreement. get_groups() needs OpenSSL 3.5 or later, and group() needs 3.2 or later. This card covers key agreement only. Certificate signatures are a separate check.

OpenSSL 3.5 NEWS

Control key agreement with set_groups()

Python 3.15 added SSLContext.set_groups(), which takes a string in the OpenSSL group list format and sets the groups allowed for key agreement. It lists several groups at once and covers finite-field and post-quantum groups as well as ECDH curves, extending the single-curve set_ecdh_curve() control. Set it in one place, then check the outcome with SSLSocket.group() on a test connection. Test against each peer you connect to, including older clients, and record the group each connection reports.

Python 3.15 What's New

ML-KEM key encapsulation in cryptography

The cryptography package exposes MLKEM768 and MLKEM1024 key classes for ML-KEM key encapsulation, defined in FIPS 203. The classes were added in cryptography 47.0.0, and from 48.0.0 wheels provide them when the OpenSSL in use is 3.5.0 or later. The classes raise UnsupportedAlgorithm when the backend lacks support, so check the installed version and the OpenSSL it reports. These are application-level classes you call in your own code, and the ssl module does not call them.

ML-KEM docs

ML-DSA signing and certificate verification

The cryptography package exposes MLDSA44, MLDSA65 and MLDSA87 key classes for ML-DSA signing, defined in FIPS 204. Signing and verifying X.509 certificates, CSRs and CRLs with ML-DSA keys arrived in 49.0.0, and 50.0.0 made verification accept ML-DSA-44, ML-DSA-65 and ML-DSA-87 by default verification. Pin the package to 50.0.0 or later before you rely on that behavior in a certificate, CRL or CSR workflow. These classes are application-level, and the ssl module does not use them for handshake certificates.

ML-DSA docs

Composite ML-DSA-44 with Ed25519

cryptography 51.0.0, released 2026-12-01, added key classes for composite ML-DSA-44 with Ed25519 in OpenSSH format. Use them only where your OpenSSH-format workflow expects a composite key, and confirm that every tool that reads those keys supports the composite type before you issue one. The release notes add no entries for SLH-DSA or X25519MLKEM768, so the release does not add key exchange support. These classes are application-level, and the ssl module does not use them. Record the version in your inventory alongside the key files it produced.

cryptography changelog

What Python post-quantum support depends on: OpenSSL and the cryptography wheel

Post-quantum behavior in Python's ssl module is set by the OpenSSL library the interpreter is linked against. Since Python 3.10, the ssl module requires OpenSSL 1.1.1 or newer, so a build linked to an older library does not meet the module's own requirement. The newer inspection methods need more. SSLContext.get_groups(), which lists the groups available, requires OpenSSL 3.5 or later, and SSLSocket.group(), which reports the group used for key agreement on a connection, requires OpenSSL 3.2 or later. The linked OpenSSL decides which groups exist, so an interpreter linked to an older OpenSSL cannot list post-quantum groups that the library does not have, whatever the Python version. Before you plan a change, run the interpreter you deploy, record the OpenSSL version it reports, and confirm that get_groups() and group() are present there. The Python ssl documentation gives the module-level requirements.

The cryptography package is a separate path. Its statically linked wheels for macOS, Windows and Linux carry their own bundled OpenSSL, so a pip-installed cryptography does not follow the ssl module's OpenSSL. The changelog lists bundled OpenSSL 4.1.1 in cryptography 51.0.0, released 2026-12-01. An application can therefore run the ssl module on one OpenSSL and cryptography on another, and the two can expose different post-quantum options. Record the cryptography version and its bundled OpenSSL as their own line in your inventory, separate from the Python build. For ML-KEM and ML-DSA, cryptography 48.0.0 (2026-05-04) made these available in wheels when the backend uses OpenSSL 3.5.0 or later, and the key classes raise UnsupportedAlgorithm when the backend lacks support, so test the installed version rather than assuming it. The cryptography installation documentation describes the wheel packaging.

Two further conditions can change what the interpreter provides. The hashlib module uses the linked OpenSSL where available and, since Python 3.12, falls back to a HACL* implementation for MD5, SHA1, SHA2 or SHA3 that OpenSSL does not provide. The hashlib documentation also says algorithms may be missing or blocked in a FIPS compliant build or when OpenSSL FIPS mode excludes them, so a hardened image can lack algorithms that a standard build has. Confirm in your own environment whether the Python build is FIPS compliant and whether OpenSSL FIPS mode is active. The facts available for this page do not cover operating system, firmware, hardware or license tier, so confirm those with your operating system vendor, hardware supplier and Python distributor before you treat any result here as applying to your deployment.

How to turn on post-quantum key agreement in Python 3.15

This sequence turns on post-quantum key agreement for a Python 3.15 TLS context you control, then confirms the group a live connection negotiated. Each step depends on the OpenSSL build the ssl module is linked against, so the check at the start decides whether the rest applies. Finish on a test peer before you change production.

  1. Confirm the Python 3.15 build

    Run the interpreter you plan to deploy and confirm it reports Python 3.15, for example with python3 --version. The What's New page gives 9 October 2026 as the release date, and the 3.15.1 release page lists a .sigstore file beside each download, so verify the installer with that signature before you install it. Record where the binary came from. A system package or container image may carry a different build, so check the version there too. This step is done when the version is 3.15.x and the source is written down.

  2. Check the linked OpenSSL with get_groups

    Start the interpreter and call get_groups() on a context, for example ssl.create_default_context().get_groups(). SSLContext.get_groups() requires OpenSSL 3.5 or later, so on an older OpenSSL the call fails, and that failure is your signal that this build cannot use this sequence. A successful call returns the group names this build supports. Save that list, since the names you use later must come from it, and record the OpenSSL version the ssl module reports. This step is done when the call returns a list.

  3. Create the context with create_default_context

    Call ssl.create_default_context() with the purpose that matches your side: ssl.Purpose.SERVER_AUTH for a client and ssl.Purpose.CLIENT_AUTH for a server. The function sets the TLS client or server protocol with SSLv2 and SSLv3 disabled, and for server authentication it requires certificate verification and loads CA certificates. Keep these defaults unless you have a specific reason to change them, because the ssl docs warn that they may change to more restrictive values without prior deprecation. This step is done when the context is created without errors and a client context reports CERT_REQUIRED as its verify mode.

  4. Set key agreement groups with set_groups

    Call set_groups() on the context with a string in the OpenSSL group list format. This page does not give a group string, so take the exact names from your build's get_groups() output and check the list format in the Python 3.15 ssl documentation. The What's New page says set_groups() can list multiple groups and extends set_ecdh_curve(). This step is done when set_groups() returns without an error. If it raises one, compare each name against the saved list from the previous step.

  5. Apply the context to sockets

    Apply the configured context to the sockets your server or client opens, and use it for every connection you want to test. Before 3.15, the key agreement control was set_ecdh_curve(), and the ssl docs note that it does not apply to client sockets, so a client on an earlier release cannot set the group this way and this sequence does not cover that case. On 3.15, set_groups() on the context is the control to use. This step is done when your server or client starts with the configured context and completes a handshake.

  6. Test a connection and read the group

    Connect to a peer you control using the configured context, complete the handshake, and call SSLSocket.group() on the connected socket. The method returns the group used for key agreement on that connection and requires OpenSSL 3.2 or later. Compare the returned name with the group you set. This step is done when the names match. If they do not match, check that the peer offers the same group, since negotiation needs a group both sides support.

  7. Confirm the default in your build

    Do not assume Python negotiates a post-quantum group by default. Make one connection with a context where you have not called set_groups(), call SSLSocket.group() on it, and record the name for this build. Repeat the check after each Python or OpenSSL upgrade, because the ssl docs warn that default settings may change without prior deprecation. This step is done when you have a recorded default for each build you run.

Where key agreement and certificate signatures sit in one Python TLS connection

The diagram starts when the client sends a ClientHello with key shares. The Python ssl endpoint, linked to OpenSSL, selects a group that set_groups() allows and completes key agreement with it. The post-quantum step appears only when OpenSSL is 3.5 or later and the group is offered. Certificate signatures are a separate step: the chain is signed with RSA or ECDSA, as the ssl docs describe. To check a live connection, read SSLSocket.group(), which reports the key agreement group.

Key agreement and certificate signing are separate steps in one TLS handshake.

What Python does not yet support or has not published as of 2026-12-03

As of 2026-12-03, the six items below are unpublished for Python: no documentation, changelog entry or release record confirms them. Unpublished is not the same as unavailable for good, so treat each card as a check to run against the release, build and package you actually deploy.

Post-quantum certificates and signatures

The ssl module has no documented post-quantum certificate or signature algorithm as of this date. Python 3.15 added SSLContext.set_client_sigalgs(), SSLContext.set_server_sigalgs(), ssl.get_sigalgs() and SSLSocket sigalg inspection methods, which restrict certificate and handshake signature algorithms from code. Nothing published says those controls add post-quantum algorithms, so confirm which algorithm names your 3.15 build accepts before you count them as certificate coverage.

Python 3.15 What's New

SLH-DSA and X25519MLKEM768 in cryptography

The cryptography changelog, read through the 51.0.0 entry dated 2026-12-01, has no SLH-DSA or X25519MLKEM768 entry. Its ML-KEM and ML-DSA support is a separate item: those arrived in wheels with 48.0.0 when built against OpenSSL 3.5.0 or later. A pip-installed package uses the OpenSSL bundled in its wheel, while the ssl module uses the OpenSSL it is linked against, so check the installed package's own algorithm list and re-read the changelog for any release after 51.0.0.

cryptography changelog

Python versions before 3.15

Python 3.15 added SSLContext.set_groups(), which sets the key agreement groups a connection may use, including post-quantum groups. No set_groups() is documented for earlier releases. Before 3.15, the documented control for key agreement is set_ecdh_curve(), whose doc example uses prime256v1 and which does not apply to client sockets. If you run 3.14 or earlier, confirm in that version's ssl documentation whether any post-quantum group can be selected, and do not assume the 3.15 options exist.

Python ssl docs

Validated and FIPS builds

No validation statement for any Python build appears in the records on this page, so no validated or FIPS mode configuration is documented. The hashlib docs say algorithms may be missing or blocked in a FIPS compliant build or when OpenSSL FIPS mode excludes them. Ask the vendor or distributor for the validation details that apply to your exact build, and test each hash and TLS algorithm you rely on in FIPS mode before you record it as supported.

Python hashlib docs

Linux distribution builds

The CPython tracker records cover the Windows builds and the macOS installer, moving to OpenSSL 3.5.8 on the 3.14 and 3.15 branches in the August 2026 update, with the 3.15 macOS installer later at OpenSSL 3.5.9 under a pull request merged on 2026-09-30. Linux distribution packages of Python are not covered by these records, so nothing here shows how they are built or which OpenSSL they link. Check your distribution's package and its OpenSSL version directly, because the linked OpenSSL decides which ssl and hashlib algorithms exist.

CPython OpenSSL update issue

Parameter sets for federal profiles

Nothing published here says which ML-KEM or ML-DSA parameter sets the ssl module negotiates. The cryptography package exposes MLKEM768, MLKEM1024, MLDSA44, MLDSA65 and MLDSA87 key classes, which apply to code that calls them directly and say nothing about a TLS handshake. OpenSSL 3.5.0 changed its default key shares to include X25519MLKEM768, so whether a Python build offers it depends on the OpenSSL it links. If your federal profile names specific sets, capture the handshake from your build with a test client before you record a match.

OpenSSL 3.5 NEWS

What to do next, by situation

Each situation starts from the Python and OpenSSL builds you actually run, so the record states what is supported and what is not. The sequence ends with a dated inventory entry, a handshake you can verify, and customer answers that match the documented facts.

  1. Record the Python and OpenSSL build

    The platform team lists every service that runs Python, the Python minor version of each, and the OpenSSL build the ssl module is linked against. Keep the cryptography package on its own row, because a pip-installed cryptography uses its own bundled OpenSSL. The step is done when each service has one row showing both versions, and that row decides which of the cases below applies.

  2. Test set_groups on a non-production endpoint

    On Python 3.15 with OpenSSL 3.5 or later, the platform or security engineer sets the allowed key agreement groups with SSLContext.set_groups(), using the OpenSSL group list format that the 3.15 ssl documentation describes. Make the change only on a non-production endpoint, and test it with the clients that will connect after rollout. The step is done when a test handshake completes with the configured groups and the test clients that need the endpoint can connect.

  3. Confirm the negotiated group with SSLSocket.group()

    After a test connection is established, call SSLSocket.group() on the socket to read the group used for key agreement. The method needs OpenSSL 3.2 or later, so a 3.5 build covers it. The step is done when the logged group matches the one you expect for that client. If a client negotiates a different group, record that client and its version before you roll out.

  4. Roll out and record the Python build

    Roll out the tested configuration to production endpoints one service at a time, and keep the previous setting available for rollback. The platform team records the Python 3.15 build, the OpenSSL build, the groups list and the date of the handshake test in the inventory. The step is done when the inventory row matches the running configuration on each production endpoint.

  5. Record Python 3.14 and earlier without set_groups

    The set_groups() method is documented in the Python 3.15 release notes and ssl documentation, so record it as not available on Python 3.14 and earlier, and confirm that against the documentation for your exact build. An OpenSSL upgrade alone does not add the method to an older interpreter. The step is done when each 3.14 or earlier row carries that status, the date you checked, and a named owner for the upgrade.

  6. Plan the upgrade and front older endpoints

    Use the upgrade guide on Python runtimes and code to set a target version and schedule for each service. While you wait, put TLS termination in front of the Python service with a reverse proxy, load balancer or gateway whose own vendor documentation confirms the post-quantum key agreement you need. Check that version's documentation before relying on it. The step is done when the upgrade plan names each service and the fronting component is recorded with its version and documentation link.

  7. Answer questionnaires with dated, per-version status

    For a customer questionnaire, write one status line per Python version in use, with the source and the date you read it. Illustrative: Python 3.15 with OpenSSL 3.5 or later offers SSLContext.set_groups() according to the 3.15 release notes, checked on the date you record, while Python 3.14 and earlier are recorded as without set_groups. Do not use the phrase quantum safe as a product claim, because the documented facts describe specific settings, versions and builds. The step is done when each answer names the version, OpenSSL build, source and date, and a reviewer can trace every line.

  8. Confirm the CNSA 2.0 requirement with customers

    When a federal contract cites CNSA 2.0, ask the customer in writing which requirement applies and which parameter sets it expects. The Python documentation this page relies on does not connect Python to CNSA 2.0, so do not record Python as meeting it. CNSA 2.0 applies to national security systems and does not bind commercial organizations, so the contract terms and the customer's written answer determine what you must meet. The step is done when the customer's answer names the requirement and parameter sets, and your record refers to that answer.

What to ask the Python distributor or vendor where the facts leave gaps

Several answers depend on the exact build you run, not on the Python source alone. Send these questions to the people who ship your interpreter, installer, container or application packages, and record each answer with its version and date. The Python project's own plans are covered on the Python post-quantum roadmap and project notices page.

OpenSSL version per build

Ask each installer, package or container publisher which OpenSSL version each build links and the date that version went in. The CPython tracker for the August 2026 OpenSSL update shows the Windows builds and macOS installer moving to OpenSSL 3.5.8 on the 3.14 and 3.15 branches, and a pull request merged on 2026-09-30 moved the 3.15 macOS installer to OpenSSL 3.5.9. Those are upstream dates. Your distributor may ship them later, on a different branch or in a rebuilt container, so record the value of ssl.OPENSSL_VERSION on each host and compare it with the release notes.

CPython tracker

Hybrid key agreement defaults

Ask whether hybrid key agreement is enabled by default in the build you use, and which OpenSSL and Python versions set the default groups. OpenSSL 3.5.0, released 8 April 2025, changed its default TLS key shares to offer X25519MLKEM768 and X25519. Whether a Python connection offers that group also depends on the ssl module and the group list it uses. Python 3.15 adds SSLContext.set_groups(), and SSLSocket.group() reports the group used on a connection, so ask the vendor to confirm the default in their build, whether it can be overridden, and then test it on a live connection.

OpenSSL 3.5 NEWS

Post-quantum certificates in ssl

Ask whether a post-quantum certificate or signature option will appear in the ssl module, for which Python release, and on what date, if any. Python 3.15 added SSLContext.set_client_sigalgs(), SSLContext.set_server_sigalgs() and ssl.get_sigalgs(), which let code restrict the signature algorithms used in certificates and handshakes. These settings control which signature algorithms are offered. They do not show whether a post-quantum certificate can be issued or verified. If the vendor cannot name a release or date, record that no date was given.

Python 3.15 What's New

FIPS validation and blocked algorithms

Ask whether the build has a FIPS validation, and for which exact module and version. Then ask which algorithms its FIPS mode blocks. The hashlib documentation says algorithms may be missing or blocked in a FIPS compliant build, or when OpenSSL FIPS mode excludes them, so an algorithm that a standard build offers may be absent on a validated one. Request the validation certificate number, the module name and version, the list of blocked algorithms, and whether any post-quantum algorithm in the OpenSSL build sits inside the validated boundary. Get these in writing, and do not accept a general FIPS statement in place of a validation record.

hashlib docs

Bundled OpenSSL in cryptography

Ask which cryptography version and bundled OpenSSL each application ships. The cryptography package installs statically linked wheels with its own OpenSSL, so a pip-installed cryptography does not use the OpenSSL that the ssl module uses. The cryptography changelog lists bundled OpenSSL 4.1.1 in cryptography 51.0.0, released 2026-12-01. ML-KEM and ML-DSA became available in wheels in cryptography 48.0.0 (2026-05-04) when the OpenSSL build is 3.5.0 or later. Check each application's lock file, because an older pinned version bundles a different OpenSSL and may lack these classes.

cryptography installation docs

Is Python quantum safe, and which version do I need?

Is Python quantum safe for TLS connections today?

Python does not offer a blanket quantum safe status, but its 3.15 release adds post-quantum key agreement groups for TLS when the ssl module is linked to an OpenSSL build of 3.5 or later. Those groups cover key agreement only. As of 2026-12-03, the Python 3.15 ssl documentation describes post-quantum groups for key agreement and does not document post-quantum certificates, so server and client certificates still use classical algorithms such as RSA or ECDSA. Support depends on the OpenSSL build behind your interpreter, not on the Python version alone. Confirm the OpenSSL version your interpreter reports, and the groups it lists, before you describe any connection as using post-quantum key agreement. The cryptography package is separate: a pip-installed copy bundles its own OpenSSL, so its results do not show what the ssl module does.

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

You need Python 3.15 to call set_groups(), which sets the key agreement groups allowed on an SSLContext. Python 3.15 is the latest stable release according to its What's New page, which gives 9 October 2026 as the release date. The version requirements for the related methods are separate. SSLContext.get_groups(), which lists the groups available in your build, requires OpenSSL 3.5 or later. SSLSocket.group(), which reports the group used on a live connection, requires OpenSSL 3.2 or later. In short: Python 3.15 for set_groups(), OpenSSL 3.5 or later for get_groups(), and OpenSSL 3.2 or later for SSLSocket.group(). The sources for this page do not state which OpenSSL version set_groups() itself needs, so confirm that in the 3.15 ssl documentation and with your build before you plan the upgrade. The 3.15.1 release page, dated October 21, 2026, lists the release files.

Does moving Python to post-quantum key exchange cost extra?

The sources for this page give no price and no license terms for Python or its dependencies, so confirm license terms with your legal or procurement team. The cost comes from labor and testing. Expect four cost components: the upgrade to Python 3.15 and an OpenSSL build of 3.5 or later, testing handshakes with each client and peer class, updating images, packages and deployment pipelines, and review time to record evidence for security and compliance teams. The upgrade and first round of testing are mostly one-time. Patching OpenSSL and retesting after Python releases recur. Costs rise with the number of services, the number of interpreters and images in use, and the number of external clients that must be tested. Ask for a written scope that covers the inventory, the test plan, the rollout steps, and the evidence list before you accept any quote. DeployOpen works on fixed scopes agreed in writing before work starts. It does not publish prices, and a quote follows from that written scope.

What breaks when I enable a post-quantum key exchange group in Python?

The first likely failure is a peer that does not offer the group you enabled, so the handshake falls back or fails. Test each group against every client and peer class before rollout. The Python ssl documentation warns that the default protocol, option and cipher settings of create_default_context() may change to more restrictive values at any time without prior deprecation, so a Python upgrade can change behavior without a code change. Since Python 3.10, the default cipher list for TLS 1.2 and earlier is limited to secure AES and ChaCha20 ciphers with forward secrecy at security level 2. Security level 2 prohibits RSA and DH keys under 2048 bits and ECC keys under 224 bits, so peers that present smaller keys cannot connect under that level. For TLS 1.3, all AES-GCM and ChaCha20 suites are enabled by default, and Python 3.15 adds set_ciphersuites() to restrict them. Use these checks:

  • Test each enabled group with every client and peer class.
  • Pin the Python and OpenSSL versions, then retest after each upgrade.
  • Record the key sizes and security level your peers present.
What should I ask a vendor about Python post-quantum support?

Ask which Python release and OpenSSL build carry the groups you need, and whether the default group list will change. Use the vendor questions section on this page for the full list. Start with these questions:

  • Which Python release and OpenSSL version ship each group, and which groups appear in the defaults?
  • Is a post-quantum certificate or certificate signature planned for the ssl module, and what is the date of that statement?
  • How do default settings change between releases, and how much notice do you give before a change?
  • Which OpenSSL version does the cryptography wheel you use bundle, and does it support the algorithms you need?
  • How are release artifacts signed and verified? PEP 761 makes Sigstore the only signing method for new CPython release series, and the 3.15.1 release page lists a .sigstore file beside each download.

Record each answer with its date, because the sources for this page are dated and these settings can change.

Can our own team turn on post-quantum support in Python?

Yes, if your team has a test environment that resembles production, a current inventory of where Python handles TLS and keys, and the ability to change and roll back interpreter and OpenSSL builds. Begin with the inventory. Then upgrade one non-production service to Python 3.15 with an OpenSSL build of 3.5 or later, confirm the group list and the negotiated group on a test connection with each client class, and move to production only after those checks pass. Outside help is a reasonable option when the inventory is large, several services share one image, or reviewers need written evidence. DeployOpen offers scoped work of this kind, including upgrades, testing and documentation, with the scope, deliverables and timelines agreed in writing before work starts. Ongoing upgrades and testing can be handled under a retainer. DeployOpen does not issue audit reports or certifications, so assessment evidence comes from your records and an independent assessor.

Does Python's ssl module support post-quantum certificates today?

As of 2026-12-03, the Python 3.15 ssl documentation describes post-quantum groups for key agreement and does not document post-quantum certificates. Python 3.15 adds signature algorithm controls instead: set_client_sigalgs() and set_server_sigalgs() on an SSLContext, and the ssl.get_sigalgs() function. These let your code restrict which certificate and handshake signature algorithms are offered. They restrict the algorithms in use; they do not add a new certificate type. The signature algorithms available also depend on the OpenSSL build behind the module. A server certificate is still issued by a certificate authority under its own keys, so a change to a certificate chain is a PKI task, not a Python setting. Check the certificate plan with your certificate authority and the PKI and certificate authorities pillar on this site. Before you change any signature setting, confirm the algorithms your OpenSSL build exposes in the 3.15 documentation and test each client that validates your certificates.

How DeployOpen helps teams check, enable and document Python post-quantum support

DeployOpen works on this question inside your own environment, where Python runs as part of the self-hosted platforms and services you operate. We check which ssl, cryptography and hashlib paths your systems use, enable only the settings your OpenSSL build and Python version support, and document the result for your security and vendor-risk reviewers. Scope is agreed in writing before work starts.

How we scope

  • The written scope names the Python versions, OpenSSL builds and services in the review.
  • It lists which ssl, cryptography and hashlib uses are in and out of the inventory.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We map where each Python service calls ssl, cryptography or hashlib, and record the OpenSSL build behind each.
  • We test TLS minimum versions, cipher settings and certificate verification in a test environment before production.
  • Where a post-quantum group or signature is available, we enable it only after a compatibility check.

How we hand over

  • You receive a dated inventory of Python cryptography use, with the version and OpenSSL build for each item.
  • Configuration changes are documented with the exact setting names, file paths and the tests that passed.
  • Evidence is prepared for your auditors and reviewers; DeployOpen does not issue audit reports or attestations.

How we support

  • Retainers cover upgrades when Python, OpenSSL or the cryptography package changes versions.
  • Ongoing testing can rerun the inventory checks after each release of Python or OpenSSL.
  • Ask for a written quote based on the scope; DeployOpen does not publish a price list.

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.