← Back to section · Tutorials & Labs
Choosing a PQC Library by Scenario: A Decision Guide to the Open-Source Ecosystem
Research prototypes, production integration and embedded targets want completely different things from a cryptography library: candidates and criteria per scenario, the upgrade traps of renames (Kyber to ML-KEM) and removals, and a final actionable checklist.
The earlier articles in this subcategory covered building liboqs, its bindings and its injection routes. A natural question follows: when you actually have to choose, which library should you use? The answer depends on the scenario. The same library can be the optimal choice for a paper’s prototype and entirely unqualified for a service that must run for five years. This tutorial gives candidates and criteria for three scenarios — research prototypes, production integration and embedded targets — then treats upgrade traps separately, and finishes with a checklist you can execute directly.
Scenario one: research prototypes and algorithm evaluation
The goal is validating ideas quickly, comparing algorithms side by side and producing reproducible experimental data. The first choice here is liboqs and its language bindings: the widest algorithm coverage, including many candidates that never entered a standard, a uniform interface, and the largest stock of community evaluation scripts and tutorials. Pair it with PQClean when you need clean source for controlled experiments or teaching, and use oqs-provider or oqs-boringssl when the object of study is TLS protocol behaviour. The governing criteria in this scenario are coverage and time-to-first-result; audit history is irrelevant — but write down from day one that prototype code must not graduate directly into production, and note the library’s research positioning in your experimental conclusions so downstream readers do not misread them.
Scenario two: integrating algorithms into production systems
The goal is bringing standardized algorithms into systems that must run for years. The selection order reverses: step one, check whether the cryptographic stack you already use natively supports the target algorithms in its official releases. Over the past couple of years mainstream implementations have been absorbing the standards quickly — OpenSSL, for example, ships ML-KEM, ML-DSA and SLH-DSA built in from version 3.5, making plug-ins such as oqs-provider unnecessary there; in the Java and .NET ecosystems, Bouncy Castle has long maintained a broad implementation set including post-quantum algorithms and is the routine choice for JVM teams. Step two, if native support is missing, evaluate the maintainer and the process: who maintains it, how steady the release cadence is, how security issues are disclosed and fixed, and whether there is a public audit or certification track record (such as a FIPS 140-3 validation process). Performance and API taste come third. In production, wide algorithm coverage can actually be a minus: enabling only the standard algorithms you truly need, and keeping candidates out of production dependencies, is the safer default posture.
Scenario three: embedded and constrained devices
The goal is running algorithms on microcontrollers and similar targets where memory is counted in hundreds of kilobytes and dynamic allocation is off the table. General-purpose libraries mostly drop out here; this scenario has its own ecosystem. The pqm4 framework builds on PQClean-style clean implementations to provide optimized implementations and uniform benchmarking for typical targets such as the Cortex-M family, and is the de facto standard for feasibility checks and comparisons; product-oriented embedded TLS stacks such as wolfSSL also offer post-quantum algorithm support with an emphasis on memory control. The criteria, in priority order: peak RAM and stack usage, the impact of key and signature sizes on storage and communication budgets, availability of constant-time implementations, and only then speed. Pay special attention to algorithms with hard state-management requirements, such as stateful hash-based signatures: library support is merely the prerequisite — anti-rollback and state persistence on the device are where the real engineering lives.
Upgrade traps: renames, removals and identifier drift
Whichever library you choose, version upgrades dominate the long-term cost, and the post-quantum ecosystem has three characteristic traps. First, standardization renames: Kyber became ML-KEM, Dilithium became ML-DSA, SPHINCS+ became SLH-DSA; libraries following the standards variously keep old names as aliases or remove them outright, so hard-coded algorithm name strings fail in batches at upgrade time. Second, algorithm removals: research libraries prune losing candidates as standardization proceeds, and an upgrade may simply delete a candidate algorithm you depend on. Third, protocol identifier drift: the code points and hybrid group names assigned to algorithms in protocols such as TLS changed repeatedly during the draft phase, so passing interoperability tests today guarantees nothing after an upgrade. The countermeasures are three disciplines: pin versions and keep a lock record rather than floating; maintain a project table of algorithm identifiers covering library names, standard names and protocol code points; and for every upgrade, run your test vectors and interoperability cases in an isolated environment before the upgrade reaches the main branch.
Before the checklist, one more criterion that is often overlooked: licensing and compliance constraints. Open-source cryptography libraries ship under differing licences, some permissive and some copyleft, and commercial products must clear compatibility through their legal or compliance process before adoption; in addition, some industries and jurisdictions manage cryptographic algorithms through approved catalogues, so “is the algorithm on the permitted list” and “is the library usable” are separate checks that must both pass. This criterion has nothing to do with performance, yet it is the one most likely to cause rework late in a project.
The checklist
Condense the article into six answerable questions. One: is my scenario prototype, production or embedded? Two: does the official release of my existing stack already support the target standard algorithms natively? Three: can I identify the candidate library’s maintainer, release cadence and security response process? Four: have I enabled only the algorithms I genuinely need, and pruned the rest from the build? Five: are versions pinned, and is the algorithm identifier mapping table in place? Six: have I accounted for the changed key and signature sizes in my storage, bandwidth and certificate-chain budgets? Selection is complete only when all six have definite answers. And remember that this field moves fast: put “when to re-review this choice” on the project calendar as well — standards evolve and native support keeps filling in, so today’s optimal answer deserves a second look a year from now.
Tags: library selectionliboqsOpenSSLembedded