How to configure post-quantum algorithms in Bouncy Castle

Bouncy Castle enables post-quantum key exchange and signatures through the host application's configuration, with the strongest TLS support in Java 1.87 and C# .NET 2.7.0; check your edition and version before relying on any setting.

On this page

Which Bouncy Castle settings turn on post-quantum algorithms today

If you run an application on Bouncy Castle and need post-quantum key exchange or signatures, the short answer is that support is switched on by your host application's configuration, and what you can turn on depends on the Bouncy Castle version and edition you ship. The most recent TLS changes are in Java 1.87, where BCJSSE now offers the X25519MLKEM768 hybrid first by default, and in C# .NET 2.7.0, which adds hybrid ML-KEM key exchange and ML-DSA and SLH-DSA authentication for TLS 1.3. Bouncy Castle has no management interface or update channel of its own, so enablement is code and configuration in your application, not a switch in a console. Check your version first, then your code path, because a newer library on the classpath does not change behavior that your application configures explicitly.

In Java, the TLS provider is added through the BouncyCastleJsseProvider class and referenced by the provider name BCJSSE. The Properties javadoc lists JSSE_USE_NAMED_GROUPS_ORDER, default off, which makes a TLS 1.3 server choose key-share groups by its own preference order; if you rely on hybrid groups being preferred, confirm that setting explicitly in your server. Java 1.82 added experimental ML-DSA client authentication in TLS based on draft-ietf-tls-mldsa, so treat that path as experimental unless your vendor agreement says otherwise. Java 1.84 makes ML-KEM available to Java 17 users through the Java KEM API. Bouncy Castle GitHub issue 2252 reports that X25519MLKEM768 set in jdk.tls.namedGroups was rejected on Java 25 beside the SUN providers, and the maintainer said BC TLS uses ML-KEM through javax.crypto.KEM when that API is present. Test your exact JDK and provider order before you rely on it.

FIPS editions need separate checks. The Java FIPS module BC-FJA is listed by NIST CMVP certificate 4943 as version 2.1.1, and the vendor roadmap lists bc-fips 2.2.0 as adding ML-KEM, ML-DSA and SLH-DSA, labeled early access with no firm release date. The C# .NET FIPS roadmap similarly plans post-quantum algorithms in a 2.0.0 release with no dates. Confirm with the vendor which FIPS build you would deploy and whether its approved mode includes the algorithms you need. Finally, check the algorithms behind your settings: DTLS 1.3 is opt-in and its 0-RTT and connection ID features are not yet implemented, and HQC keys from earlier releases are not compatible with 1.87.

Enablement settings by edition, version and component

This table compares each Bouncy Castle edition and version against what the vendor documents as supported for post-quantum key exchange, signatures and key formats. Read each row for the source and date, and treat the last column as the list of items to confirm before enabling them. The main takeaway is that ML-KEM and ML-DSA support differs by edition, and FIPS-validated builds lag the non-FIPS releases.

Edition or versionDocumented as supportedSource and dateNot yet supported or early access
Java 1.81PKCS#8 private key formats for ML-KEM, ML-DSA and SLH-DSA; ML-DSA and SLH-DSA in CMS SignedData; ML-KEM-only and hybrid ML-KEM/classical TLS cipher suites in JSSEBC Java 1.81 and C# .NET 2.6.1 release post, 2025-06-09ML-DSA client authentication in TLS is not listed for this release
Java 1.82Experimental ML-DSA client authentication in TLS, based on draft-ietf-tls-mldsa, plus the 1.81 featuresBC Java 1.82 release post, 2025-09-23Client authentication is marked experimental; confirm it is acceptable for your deployment
Java 1.84ML-KEM and NTRU available to Java 17 users through the Java KEM API; 1.82 and 1.81 features carried forwardBC Java 1.84 release post, 2026-05-12Java 17 KEM API is the only new capability listed; confirm the runtime version you run
Java 1.87BCJSSE offers the X25519MLKEM768 hybrid first by default; PQC algorithms report a NIST security category through PQCParameters; QuantumVulnerableConstraint available through org.bouncycastle.constraints.quantum_vulnerableBC Java 1.87 release post, 2026-11-11Signature composites and hybrids are specifications only; DTLS 1.3 is opt-in with 0-RTT and connection IDs not yet implemented; HQC keys from earlier releases are incompatible with 1.87; Classic McEliece is deprecated
C# .NET 2.6.1ML-KEM-only TLS support; PKCS#8 and CMS formats as in Java 1.81BC Java 1.81 and C# .NET 2.6.1 release post, 2025-06-09Hybrid ML-KEM key exchange was still in progress at this date; confirm against the 2.7.0 notes
C# .NET 2.7.0Hybrid ML-KEM key exchange and ML-DSA and SLH-DSA authentication for TLS 1.3BC C# 2.7.0 release post, 2026-08-07Confirm whether any listed feature is limited to TLS 1.3 only in your deployment
Java FIPS, BC-FJA 2.1.1Validated module listed as FIPS 140-3, overall level 1, status Active; the module listing does not list ML-KEM, ML-DSA or SLH-DSANIST CMVP certificate 4943; BC Java FIPS roadmap, checked 2026-12-03PQC algorithms are not listed in this validated version; confirm with the vendor before relying on the certificate for PQC use
Java FIPS, bc-fips 2.2.0 (planned)Roadmap lists ML-KEM, ML-DSA and SLH-DSABC Java FIPS roadmap, checked 2026-12-03Labeled early access and under test, with no firm release date
C# .NET FIPS, planned 2.0.0Roadmap lists ML-KEM, ML-DSA and SLH-DSA in approved mode under FIPS 140-3BC C# FIPS roadmap, checked 2026-12-03Planned only; no release dates given, so confirm current status with the vendor

Which parts of the application the enablement touches

Enabling post-quantum algorithms in Bouncy Castle is not one switch. The BCJSSE provider, the TLS 1.3 group settings, the ML-KEM path on Java, certificate formats and the quantum-vulnerable constraint each change a different part of the application. Review each one against your own configuration before you test.

BCJSSE TLS provider

BCJSSE is the TLS provider inside Bouncy Castle, added through the BouncyCastleJsseProvider class and referenced by the name BCJSSE. Your application must register it and request it by name for the post-quantum TLS behavior to apply. Its FIPS mode restricts cipher suites and parameters to those usable in a FIPS-compliant TLS setup, so check which mode your deployment runs in before you test key exchange.

TLS user guide

TLS 1.3 key-share group order

For TLS 1.3, the server chooses key-share groups in an order that is set by the JSSE_USE_NAMED_GROUPS_ORDER property. The default is off, so the server does not use its own preference order unless you enable it. Turning it on makes the server pick a post-quantum hybrid group, such as X25519MLKEM768, when the client offers one. Confirm the property and its effect in your own handshake traces.

Properties javadoc

ML-KEM through javax.crypto.KEM

From Bouncy Castle Java 1.84, ML-KEM and NTRU are available to Java 17 users through the Java KEM API. The TLS code uses ML-KEM through javax.crypto.KEM when that API is present. On Java 25, a setting that lists X25519MLKEM768 in jdk.tls.namedGroups was rejected beside the SUN providers, as reported in issue 2252, which the maintainer closed on 2026-04-09. Test your exact JDK version and provider order, because the behavior depends on both.

Issue 2252

ML-DSA client authentication in TLS

Bouncy Castle Java 1.82 added ML-DSA client authentication in TLS, based on draft-ietf-tls-mldsa, and labeled it experimental. Your application owner must decide whether a client certificate can use ML-DSA before enabling it. Treat it as a test feature, because the draft it follows is not a final standard and the vendor marked it experimental in this release.

Key and certificate formats

Bouncy Castle Java 1.81 added finalized PKCS#8 private key formats for ML-KEM, ML-DSA and SLH-DSA, and ML-DSA and SLH-DSA signatures in CMS SignedData. Any key store, file or signing workflow that reads or writes these objects must support the new formats. Check that your tooling and downstream systems parse PKCS#8 keys for these algorithms before you rotate keys or change signing.

Release notes

Quantum-vulnerable constraint property

Bouncy Castle Java 1.87 adds a QuantumVulnerableConstraint, enabled through the org.bouncycastle.constraints.quantum_vulnerable property, which defaults to none. The constraint reports use of RSA, DSA, DH, EC, EdDSA and X25519/X448 under the NIST IR 8547 timetable, with options including nist, log, legacy and reject. Set it to log first to find where your application still relies on these algorithms, then decide whether to use reject in production.

Java 1.87 notes

How to enable and test post-quantum algorithms in order

This sequence takes a Bouncy Castle deployment from confirming the edition and version it runs, through enabling a TLS provider and post-quantum key exchange groups, to testing each client class and recording which assets still rely on classical algorithms. Each step closes with a check the engineer can record in the change file.

  1. Confirm the edition and version in use

    The engineer who runs the application records which Bouncy Castle edition (Java, Java LTS, Java FIPS, C# .NET, C# .NET FIPS, Rust or Kotlin) and which exact version is on the classpath or in the build manifest. Post-quantum support differs by edition and release: the Java 1.81 and C# .NET 2.6.1 release post says Java JSSE gained ML-KEM-only and hybrid TLS suites, while C# .NET added hybrid ML-KEM key exchange in 2.7.0, dated 2026-08-07. Check the release post for that exact version before planning. The step is done when the edition and version are written into the change record alongside the release post you checked.

  2. Add the BCJSSE provider and select a group

    The engineer registers the BouncyCastleJsseProvider, referenced by the provider name BCJSSE, and selects the key exchange group the vendor documents for the application's protocol. On Java 1.87, BCJSSE offers the X25519MLKEM768 hybrid first by default, so a hybrid configuration needs no extra round trip. ML-KEM-only groups are the alternative where the application must not carry a classical component. Confirm the selection against the vendor's TLS user guide for your edition, since the guide is the source for provider setup. The step is done when a test connection logs or reports the negotiated group, and that value is recorded.

  3. Decide whether the server sets key-share order

    The engineer sets JSSE_USE_NAMED_GROUPS_ORDER only if the TLS 1.3 server should choose key-share groups by its own preference order. The vendor Properties javadoc lists this setting with a default of off, so the server otherwise follows the client's order. Make the decision deliberately, because a server-side order changes which group a client with several offers receives. The step is done when the chosen value, on or off, is recorded with the reason, and the same value appears in the configuration file the server loads.

  4. Run a handshake test against each client class

    The engineer runs a handshake from every client class that connects to the service, including older clients that do not offer post-quantum groups. Those clients will fall back to classical groups, and that fallback is expected behaviour that must be confirmed rather than assumed. Record the group each client class negotiates and whether the handshake completes. The step is done when a table exists with one row per client class showing the client, the negotiated group, and the result. Where a client fails to connect, the failure is recorded for follow-up before any cutover.

  5. Verify remaining classical assets with the constraint and CBOM

    The engineer enables the quantum-vulnerable constraint through the org.bouncycastle.constraints.quantum_vulnerable property. Bouncy Castle Java 1.87 applies the NIST IR 8547 timetable to RSA, DSA, DH, EC, EdDSA and X25519/X448 when this is set, and the vendor's Properties javadoc lists the options as nist, log, legacy and reject. Then generate the CBOM, which the 1.87 release post says marks quantum-vulnerable assets at security level 0. The step is done when the CBOM output is saved and the list of assets still at level 0 is recorded, so the classical dependencies are known and listed.

  6. Keep the FIPS module separate and check its roadmap

    The engineer keeps any FIPS-validated module, such as BC-FJA, separate from the non-FIPS provider in the build, and does not assume post-quantum algorithms are available inside it. NIST CMVP certificate 4943 lists BC-FJA 2.1.1 as validated, and the vendor's Java FIPS roadmap lists bc-fips 2.2.0 as adding ML-KEM, ML-DSA and SLH-DSA in early access with no firm release date. Confirm the current status of the module in use against the roadmap and the certificate before any FIPS deployment is described as post-quantum. The step is done when the FIPS module version, its certificate status and the roadmap entry are recorded together.

How enablement differs for Java, C# and FIPS deployments

The general Java release line carries the broadest post-quantum support in Bouncy Castle, but what is available depends on the release and the Java version. Bouncy Castle Java 1.81 added finalized PKCS#8 private key formats for ML-KEM, ML-DSA and SLH-DSA and added TLS support for ML-KEM-only and hybrid ML-KEM/classical cipher suites based on IETF drafts. Java 1.82 added experimental ML-DSA client authentication in TLS. Java 1.84 made ML-KEM and NTRU available to Java 17 users through the Java KEM API, so Java 17 deployments on the 1.84 line or later can use ML-KEM.

  • Release line: Confirm that your build is Java 1.81 or later for the ML-KEM and ML-DSA key formats, and 1.84 or later if you run Java 17.
  • Hybrid default: Java 1.87 states that BCJSSE now offers the X25519MLKEM768 hybrid first by default, with no extra round trip.
  • Key exchange group order: The JSSE_USE_NAMED_GROUPS_ORDER property, default off, makes a TLS 1.3 server choose key-share groups by its own preference order.
  • Signature composites: Java 1.87 lists signature composites and hybrids only as specifications.
  • Experimental and opt-in items: ML-DSA client authentication in TLS is experimental, and DTLS 1.3 is opt-in, with 0-RTT and connection IDs not yet implemented.

Before relying on any of these, check the TLS settings and key-exchange behavior in your own build, since the release notes describe defaults and not your deployment.

Where the hybrid key exchange sits in a TLS 1.3 handshake

This illustrative sequence shows a client and server running BCJSSE negotiating a TLS 1.3 connection. The client's ClientHello offers X25519MLKEM768 alongside classical groups, and the server picks one group in key-share order. By default the group follows the client's preference order. When the JSSE_USE_NAMED_GROUPS_ORDER property is on, the server uses its own order instead. If the peer offers no hybrid group, the handshake falls back to a classical key exchange. Check which order your server applies, since the default is off.

Illustrative TLS 1.3 handshake showing hybrid group selection and classical fallback in BCJSSE.

What the vendor has not published or not yet supports

The Bouncy Castle project has released a lot of post-quantum code, but several parts are still early access, specification-only, deprecated or undated. Each card below names one gap and the question to put to the vendor before relying on that capability in a configuration.

DTLS 1.3 and 0-RTT status

Bouncy Castle Java 1.87 states that DTLS 1.3 (RFC 9147) is opt-in, and that 0-RTT and connection IDs are not yet implemented. Any DTLS 1.3 setup you plan for a 1.87 deployment should be tested against that limit rather than assumed to match TLS 1.3 behavior. Ask the vendor when 0-RTT and connection IDs are scheduled, and confirm in your own test environment which DTLS 1.3 features your application actually exercises.

Java 1.87 release post

Signature composites and hybrids

The Java 1.87 release post lists signature composites and hybrids only as specifications, not as working implementations. Composite ML-DSA is named on the specifications page under RFC 10073, but the presence of a specification does not mean the code path is available for production use. Ask the vendor which composite and hybrid signature schemes have running code, in which editions, and whether any are planned for the FIPS modules.

Specifications page

HQC key incompatibility

Bouncy Castle Java 1.87 states that HQC keys and ciphertexts from earlier releases are not compatible with 1.87. HQC also follows the 2026-10-12 specification on the path to FIPS 207. If you have generated HQC keys or stored HQC ciphertexts under an earlier release, plan a migration or re-keying step before upgrading. Ask the vendor for a migration path and confirm which key formats any stored material uses.

Java 1.87 release post

Classic McEliece deprecation

The Java 1.87 release post states that Classic McEliece is deprecated. Classic McEliece appears on the specifications page as a listed algorithm, so a deprecation notice is easy to miss if you only read the algorithm list. Before selecting it for any new design, ask the vendor for the deprecation timeline, the replacement the project recommends, and whether existing deployments will keep receiving fixes.

Undated FIPS module releases

The Java FIPS roadmap lists bc-fips 2.2.0, which adds ML-KEM, ML-DSA and SLH-DSA, as early access and currently under test, with no firm release date. The C# FIPS roadmap similarly gives no dates for a planned 2.0.0 release. Validated module versions are what federal and regulated buyers usually need, so ask the vendor for a target date, the expected validation path, and whether a CMVP submission is planned.

Java FIPS roadmap

No FIPS FAQ or CNSA 2.0 coverage

The vendor FIPS FAQ says nothing about post-quantum algorithms, and the vendor pages checked do not mention CNSA 2.0, ML-KEM-1024 or ML-DSA-87. If your organization must match a specific parameter set, the public documentation does not confirm it. Ask the vendor in writing which ML-KEM and ML-DSA parameter sets are supported in each edition, and whether CNSA 2.0 alignment is planned.

BC FIPS FAQ

What can break or silently fall back to classical algorithms

A post-quantum setting in Bouncy Castle only protects a connection if the handshake actually lands on it, so the first risk is negotiation. When a peer does not offer a hybrid group such as X25519MLKEM768, the TLS exchange can complete with a classical group instead, and nothing in the application will necessarily report it. Verify this in test traffic: capture the handshake and confirm the negotiated named group for each peer type you support, including older clients and the middleboxes between them. The Java 1.87 release post says BCJSSE now offers X25519MLKEM768 first by default, but that describes what is offered, not what every peer accepts.

Configuration can also change the outcome. The JSSE_USE_NAMED_GROUPS_ORDER property, which defaults to off, decides whether a TLS 1.3 server chooses key-share groups by its own preference order, so check its value before you assume the order you wrote is the order in use. The jdk.tls.namedGroups setting is a separate control and can disagree with it. Bouncy Castle issue 2252, closed on 2026-04-09, records X25519MLKEM768 set in jdk.tls.namedGroups being rejected on Java 25 beside the SUN providers, and the maintainer's fix routes ML-KEM through javax.crypto.KEM when that API is present. Test on the exact Java version and provider order you deploy, and confirm which KEM path runs.

Some features are not ready to depend on. ML-DSA client authentication in TLS arrived as experimental in Java 1.82, based on draft-ietf-tls-mldsa, so treat it as a test item rather than a production control. For stored keys, Java 1.87 states that HQC keys and ciphertexts from earlier releases are not compatible with 1.87, so inventory any HQC material before upgrading and plan re-generation or migration. The hybrid key share is also larger than a classical one, and some middleboxes or older clients may fail to handle it. Confirm the behavior of each network path with a real handshake, and keep a documented fallback for peers that cannot complete it.

Questions engineers ask about enabling post-quantum support

Is Bouncy Castle quantum safe?

The project does not claim that Bouncy Castle is quantum safe, and this page does not reach that conclusion either. What is documented is support for specific algorithms in specific releases. Bouncy Castle Java 1.79 was announced as the first release with the finalized NIST PQC standards, covering ML-KEM, ML-DSA and SLH-DSA. Bouncy Castle C# .NET 2.7.0, dated 2026-08-07, adds hybrid ML-KEM key exchange and ML-DSA and SLH-DSA authentication for TLS 1.3. Bouncy Castle Java 1.87 lists signature composites and hybrids only as specifications. Confirm the exact algorithm, edition and version you plan to use against the vendor's release notes.

Which Bouncy Castle version is needed for hybrid TLS?

The answer depends on the edition and the language. For Java, Bouncy Castle Java 1.81 added TLS support for ML-KEM-only and hybrid ML-KEM/classical cipher suites based on IETF drafts. Bouncy Castle Java 1.87, dated 2026-11-11, states that BCJSSE now offers the X25519MLKEM768 hybrid first by default. For C# .NET, hybrid ML-KEM key exchange for TLS 1.3 arrived in 2.7.0, dated 2026-08-07. Java FIPS builds are a separate track: the vendor's FIPS roadmap lists ML-KEM only for bc-fips 2.2.0, which is labeled early access with no firm release date. Confirm the release your edition ships before you plan a rollout.

Does enabling post-quantum support cost extra?

The facts do not give a licence or build fee for enabling post-quantum algorithms. Bouncy Castle is listed under the MIT license on the project's About page, and the editions are published as Java, Java LTS, Java FIPS, C# .NET, C# .NET FIPS, Rust and Kotlin builds. The FIPS editions are where cost can differ, because their post-quantum support is still on the vendor's roadmap. The cost of your own work comes from testing, rebuilding, and changing the application that calls the library. DeployOpen scopes that effort in a written quote, so ask for one that lists the editions, the build steps and the test plan.

What breaks when post-quantum algorithms are turned on?

Bouncy Castle is a library, so the effects appear in the application that uses it. Three areas need checking. First, key-share ordering: the JSSE_USE_NAMED_GROUPS_ORDER setting is off by default, and turning it on makes a TLS 1.3 server choose key-share groups by its own preference order. Second, the JDK: a report on GitHub issue 2252 said that X25519MLKEM768 set in jdk.tls.namedGroups was rejected on Java 25 beside the SUN providers, and the maintainer closed it on 2026-04-09 after BC began using javax.crypto.KEM. Third, certificate and key formats: PKCS#8 formats for ML-KEM, ML-DSA and SLH-DSA were finalized in 1.81, so confirm your key-handling code reads them. Test each of these in your own environment.

What should we ask Bouncy Castle or our supplier?

Ask for the exact release and edition that will ship to you, and whether it includes the algorithm and the TLS mode you need. Ask whether the FIPS build of that algorithm is validated, since the NIST CMVP certificate 4943 lists BC-FJA 2.1.1 under FIPS 140-3 level 1, while the post-quantum algorithms are still in early access on the FIPS roadmap. Ask whether DTLS 1.3 is available, because the 1.87 notes say it is opt-in and that 0-RTT and connection IDs are not yet implemented. Ask how the project handles deprecations, for example the note that Classic McEliece is deprecated in 1.87. Written answers from the vendor can go into your evidence file.

Can our team enable this alone, or do we need outside help?

Your team can enable the features alone if it already runs Bouncy Castle in a Java or C# service, has test environments that mirror production, and can work through the three checks above. Outside help is most useful when the library sits inside a FIPS-bound system, when several applications share one build, or when you need a documented test plan for an audit. DeployOpen plans and tests these changes inside your own infrastructure and delivers the findings in writing. The first step is a scoping call, after which DeployOpen provides a written, fixed-scope quote covering what to test and what to change.

Where does the Bouncy Castle TLS provider get configured?

The BCJSSE TLS provider is added through the BouncyCastleJsseProvider class and referenced by the provider name BCJSSE. It also has a FIPS mode that restricts it to cipher suites and parameters usable in a FIPS-compliant TLS setup. Two other settings are worth reviewing before a rollout: JSSE_HOSTNAME_CHECK_CN_FALLBACK, which is off by default and which the vendor recommends leaving off, and X509_ENABLE_CRLDP, which is off by default and lets the validator download CRLs from distribution point URIs. Check each setting in the Properties javadoc for your release before you change it.

How DeployOpen helps your team enable and test post-quantum support

DeployOpen works on enabling post-quantum algorithms in Bouncy Castle by first confirming which edition and version your application uses, then configuring and testing the TLS and key settings that apply to it. The work is scoped in writing before it starts, and each step is checked against the vendor's documentation for your edition.

How we scope

  • We confirm which Bouncy Castle edition and version you run, such as Java, Java FIPS, C# .NET or C# .NET FIPS, since post-quantum support differs by edition.
  • We record which TLS paths, certificates and key exchanges in your application would change, and which ones stay on classical algorithms for now.
  • We agree the scope, deliverables and timeline in writing before any configuration begins, and we note any dependency on your JDK or runtime version.

How we build

  • We configure the BCJSSE provider and its named-group settings, checking that X25519MLKEM768 is offered as intended on your target runtime.
  • We review the Properties settings your application sets, including JSSE_USE_NAMED_GROUPS_ORDER and the quantum-vulnerable constraint, and document each value we change.
  • We test handshakes against your own clients and servers in a staging environment, recording which algorithms are negotiated and where a connection falls back.

How we hand over

  • We deliver a written record of each configuration change, the Bouncy Castle version it was tested on, and the handshake results from your environment.
  • We document which post-quantum algorithms are supported in your edition and which are only available as early access or experimental, so your team can plan around them.
  • We walk your engineers through the test steps so they can repeat the handshake checks after future Bouncy Castle upgrades.

How we support

  • Ongoing support and upgrades are available as a retainer, which covers re-testing when you move to a newer Bouncy Castle release.
  • We track the vendor's release notes and roadmap pages for your edition and flag changes that affect the settings we delivered.
  • We confirm with you, in writing, any change to the scope before it is made, so the support work stays within the agreed terms.

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.