PQC Open Source Libraries
Which libraries to use for post-quantum cryptography — by language, algorithm support, audit status, and production readiness.
The primary open-source reference library for post-quantum cryptography. Maintained by the Open Quantum Safe project at the University of Waterloo. Used as the foundation for OQS-OpenSSL, OQS-BoringSSL, and bindings in Python, Java, .NET, Go, and Rust.
Integrates liboqs into OpenSSL as a provider. Enables PQC key exchange and signatures in OpenSSL 3.x for TLS, certificates, and key generation. Used with Nginx, Apache, and curl for PQC-enabled TLS.
Fork of Google's BoringSSL (used in Chrome and Android) with OQS post-quantum algorithms. Used for applications that already depend on BoringSSL rather than OpenSSL.
Clean, portable, standalone C implementations of NIST PQC algorithms. No dependencies — designed for integration into other projects and for audit purposes. Each implementation is self-contained. Not optimised for performance (reference implementations) but excellent for correctness verification.
The established Java cryptography library has added comprehensive PQC support. Bouncy Castle 1.78+ includes FIPS 203, 204, 205 algorithms. The Java Bouncy Castle PQC API is mature and production-ready. C# port (The Legion of the Bouncy Castle) has parallel support.
OpenSSL 3.2+ has partial native PQC support — X25519MLKEM768 hybrid key exchange for TLS is supported natively without the OQS provider. Full ML-DSA certificate support is being added progressively. Check your version.
AWS's fork of BoringSSL, optimised for AWS infrastructure. Includes ML-KEM support for TLS hybrid key exchange. Used internally in AWS services. Open source.
Rust bindings to PQClean reference implementations. Provides safe Rust APIs for all major PQC algorithms. Part of the pqcrypto family of crates.
PQC Library Choice — By Language
| Language | Recommended Library | Installation | Notes |
|---|---|---|---|
| C / C++ | liboqs + oqs-provider (for OpenSSL) | git clone + cmake build | Primary library. Use oqs-provider to plug into existing OpenSSL-based code. |
| Python | oqs-python (liboqs binding) | pip install liboqs-python | Requires liboqs C library installed. Straightforward API for KEM and signature operations. |
| Java | Bouncy Castle 1.78+ | Maven: org.bouncycastle:bcprov-jdk18on:1.78 | Best Java option. JCE provider drop-in. Production-ready. |
| Kotlin | Bouncy Castle (same as Java) | Same as Java — Kotlin runs on JVM | Full Bouncy Castle PQC API available. |
| Rust | pqcrypto crate | cargo add pqcrypto pqcrypto-mlkem | Clean safe API. Built on PQClean. Use with RustCrypto for broader crypto. |
| .NET / C# | Bouncy Castle C# (1.9.0+) | NuGet: BouncyCastle.Cryptography | Same feature set as Java port. Production-ready. |
| Go | liboqs-go | go get github.com/open-quantum-safe/liboqs-go | Requires CGo and liboqs. Wraps the C library with Go-idiomatic API. |
| Node.js | liboqs via native addon | npm install node-oqs (or compile from source) | Ecosystem still maturing. May need to compile native bindings. |
| PHP | OpenSSL extension (when oqs-provider installed) | System OpenSSL + oqs-provider → php openssl fns | PHP crypto goes through OpenSSL — install oqs-provider at system level. |
| Browser / WASM | CRYSTALS-Kyber-js or ml-kem npm package | npm install @noble/post-quantum | @noble/post-quantum is a pure JS implementation of ML-KEM and ML-DSA — audited, no WASM required. |
Algorithm Support Matrix
| Algorithm (NIST) | liboqs | PQClean | Bouncy Castle | OpenSSL 3.2+ | AWS-LC | @noble/pq |
|---|---|---|---|---|---|---|
| ML-KEM-512 (FIPS 203) | ✅ | ✅ | ✅ | via oqs-provider | ✅ | ✅ |
| ML-KEM-768 (FIPS 203) | ✅ | ✅ | ✅ | ✅ native (hybrid) | ✅ | ✅ |
| ML-KEM-1024 (FIPS 203) | ✅ | ✅ | ✅ | via oqs-provider | ✅ | ✅ |
| ML-DSA-44 (FIPS 204) | ✅ | ✅ | ✅ | via oqs-provider | — | ✅ |
| ML-DSA-65 (FIPS 204) | ✅ | ✅ | ✅ | via oqs-provider | — | ✅ |
| ML-DSA-87 (FIPS 204) | ✅ | ✅ | ✅ | via oqs-provider | — | ✅ |
| SLH-DSA (FIPS 205) | ✅ | ✅ | ✅ | via oqs-provider | — | ✅ |
| FN-DSA / FALCON (FIPS 206) | ✅ | ✅ | ✅ | via oqs-provider | — | — |
| Classic McEliece | ✅ | ✅ | ✅ | — | — | — |
| BIKE | ✅ | ✅ | — | — | — | — |
| HQC | ✅ | ✅ | — | — | — | — |