← Back to section · Software & Developer Tools
PQC Libraries Compared: liboqs, Bouncy Castle, OpenSSL, and the Rust Ecosystem
A comparison of the leading post-quantum cryptography libraries by language, license, standards coverage, and intended use.
With post-quantum algorithms standardized, the question has shifted from “which algorithm” to “which implementation.” The same ML-KEM can differ substantially across libraries in maturity, licensing, integration style, and release cadence. This article compares four mainstream options — research-oriented liboqs, enterprise staple Bouncy Castle, infrastructure-grade OpenSSL, and the emerging Rust ecosystem — with a brief note on cloud-vendor libraries. The focus is positioning and limits rather than benchmarks: performance figures change too quickly across versions and hardware, and each project’s official documentation plus your own measurements should have the final word.
liboqs: the research and prototyping testbed
liboqs is the core library of the Open Quantum Safe (OQS) project. Written in C, it integrates a wide range of post-quantum key encapsulation and signature algorithms — both standardized ones and candidates still under evaluation — with language bindings on top. Its chief value is breadth: for algorithm comparisons, protocol prototypes, and migration feasibility studies, it is usually the first library in which every candidate can be run side by side.
Its positioning must be stated plainly, however. liboqs is MIT-licensed, and its official documentation explicitly notes that the library is intended for research and prototyping and should not be relied upon in production environments. Its correct role for production-bound teams is as a testbed: validate algorithm choices and performance envelopes with it, then implement the conclusions on a production-oriented library. Shipping a prototyping library directly to production is one of the most common selection mistakes in PQC migration.
Bouncy Castle: the Java and C# enterprise ecosystem
Bouncy Castle is a long-established cryptography library with separate Java and C# (.NET) implementations, long a default choice for enterprise applications, certificate infrastructures, and messaging security. It added post-quantum algorithm support relatively early, so systems with a large existing Bouncy Castle codebase can adopt PQC within a familiar API, with migration cost concentrated in algorithm and parameter choices rather than a rewrite of the cryptographic layer.
It is distributed under an MIT-style license (the Bouncy Castle license, with terms similar to MIT, permitting free use and redistribution). For organizations on Java or .NET stacks, its comparative advantage is not the algorithmic frontier but ecosystem depth: accumulated integration experience with PKI, secure messaging, and enterprise middleware is something newer libraries cannot quickly replicate.
OpenSSL 3.5: native support at the infrastructure layer
OpenSSL is the most widely deployed cryptography library in the world; the TLS ecosystem and a large share of infrastructure software are built on it. From version 3.5 onward, OpenSSL natively supports ML-KEM, ML-DSA, and SLH-DSA, the three standardized post-quantum algorithms, delivered through its provider architecture. Applications and middleware already using OpenSSL can therefore enable PQC within their existing integration instead of switching libraries — for operations teams, this is the lowest-friction migration path available.
OpenSSL is licensed under Apache-2.0. One boundary is worth noting: native support means the algorithm implementations are in the mainline. Protocol-level behavior — such as default enablement policies for hybrid key exchange in TLS — and distribution packaging follow their own schedules, so concrete availability should be checked against your target distribution and the official documentation.
The Rust ecosystem: RustCrypto’s modular approach
The Rust ecosystem takes a small-and-focused route. The RustCrypto project provides algorithms as individual crates, including ml-kem and ml-dsa, corresponding to FIPS 203 and FIPS 204 respectively. Each crate implements a single algorithm over shared trait abstractions (uniform interfaces for signatures and key encapsulation), and users compose only what they need. Combined with Rust’s memory-safety properties, this structure suits newly written, long-lived system components.
The limitations are equally clear: ecosystem maturity and protocol-layer integration (TLS and the like) are still developing, algorithm breadth does not match liboqs, and enterprise integration history does not match Bouncy Castle. Evaluate the maintenance status and documentation of each specific crate you depend on, rather than trusting the label “Rust ecosystem” in the abstract.
Cloud-vendor libraries and the comparison framework
Major cloud providers are also adding PQC support to their own cryptographic libraries, AWS-LC from AWS being one example. Such libraries share a pattern: integration with the provider’s own services (KMS, TLS termination, internal infrastructure) comes first, and the pace at which algorithms and features are exposed follows the service roadmap. This article deliberately stays general: which algorithms are supported, and from which version, must be verified item by item in each vendor’s official documentation. For systems deeply bound to one cloud, the vendor library is often the lowest-friction option; for systems needing cross-cloud consistency, a vendor-independent library should be preferred.
| Library | Primary language | License | Standards coverage | Intended use |
|---|---|---|---|---|
| liboqs | C (multi-language bindings) | MIT | Broad: standardized and candidate algorithms | Research, prototyping, algorithm evaluation |
| Bouncy Castle | Java, C# | MIT-style | Centered on standardized algorithms (per official docs) | Enterprise applications, PKI, legacy migration |
| OpenSSL 3.5+ | C | Apache-2.0 | Native ML-KEM, ML-DSA, SLH-DSA | TLS and infrastructure, general server use |
| RustCrypto (ml-kem / ml-dsa) | Rust | Per-crate documentation | Per-crate, aligned to FIPS 203 / 204 | New Rust system components |
| Cloud-vendor libraries (e.g., AWS-LC) | Mostly C | Per official documentation | Per official documentation | Systems bound to a single cloud |
A sensible selection order: fix the language ecosystem first (your library should live where your existing code lives), then verify license and compliance requirements, then confirm the implementation status and maintenance activity for your target algorithms, and only then compare performance. Every conclusion along these dimensions should be checked against the current official documentation — PQC libraries iterate quickly, and the comparison framework here is meant to outlast any specific finding.
After selection: maintenance, supply chain, and implementation quality
Choosing a library is only the beginning; its long-term cost concentrates in three places. First, maintenance cadence. PQC standards still evolve in their details — parameter encodings, test vectors, errata — and whether a library tracks official test vectors and specification updates determines whether a migration keeps passing interoperability checks. Judge a project by its recent release history, issue responsiveness, and whether an identifiable team maintains it, not by its algorithm list alone.
Second, implementation quality rather than the algorithms themselves. A standard algorithm’s security still has to survive its implementation: whether private-key operations are constant-time, whether the randomness source is sound, and whether key material is zeroized after use have repeatedly decided real-world outcomes for mathematically correct algorithms. For production use, prefer libraries with public security audits and continuous integration that includes known-answer tests (KAT) and cross-platform testing.
Third, the supply chain. A cryptography library sits at the very bottom of the software stack, so replacing one has an outsized blast radius. From day one, keep cryptographic calls behind your own thin wrapper layer instead of scattering algorithm APIs across the codebase — then a future library or algorithm change stays contained. This is the general principle of cryptographic agility: caging variability early is the engineering investment most worth making in the PQC era.
References
- Open Quantum Safe project and liboqs documentation: https://openquantumsafe.org/
- OpenSSL official site (releases and documentation): https://www.openssl.org/
- Bouncy Castle official site: https://www.bouncycastle.org/
- RustCrypto ml-kem crate documentation: https://docs.rs/ml-kem/
- RustCrypto ml-dsa crate documentation: https://docs.rs/ml-dsa/
- NIST FIPS standards pages for FIPS 203 / 204 / 205: https://csrc.nist.gov/projects/fips-standards
Tags: PQC librariesliboqsOpenSSLlibrary selection