← Back to section · Tutorials & Labs

Understanding OpenSSL 3's Provider Architecture: Where Algorithms Come From and How to Switch Them

OpenSSL 3 moved algorithm implementations into pluggable providers. Understanding how default, fips, legacy and external providers divide the work explains why some algorithms work on a given machine while others report unsupported.

Published 22 November 2026 · 6 min read · PQ Frontier

Understanding OpenSSL 3's Provider Architecture: Where Algorithms Come From and How to Switch Them
AI-generated site artwork
Video explainer · OpenSSL practice: command line and API

In the previous lab we used OpenSSL 3.5 to generate an ML-DSA certificate and everything just worked. But move to a different machine or a different version and the same commands may report unsupported or fail to find the algorithm at all. Explaining that class of behaviour is impossible without OpenSSL 3’s core design: the provider architecture. This article explains that architecture thoroughly; the inventory, configuration and troubleshooting articles that follow all build on it.

Algorithms No Longer Live in the Main Library

In OpenSSL 1.1.1 and earlier, algorithm implementations were compiled directly into libcrypto. From 3.0 the rules changed: the main library keeps only the framework and dispatch logic, while concrete implementations are packaged into providers — shared libraries (.so / .dll) loaded on demand at runtime. Five providers ship with OpenSSL, with this division of labour:

  • default: the everyday workhorse, containing the vast majority of modern algorithms. OpenSSL 3.5’s native ML-KEM, ML-DSA and SLH-DSA live here.
  • base: provides only non-cryptographic infrastructure such as encoding, decoding and random-number plumbing — no cryptographic algorithms at all — and is normally loaded automatically alongside default.
  • fips: the set of implementations covered by FIPS 140-3 validation; it needs separate installation and explicit activation, and once enabled only validated algorithms and parameters are available.
  • legacy: shelters old or now-unsafe algorithms such as MD2, MD4, RC4 and single DES, and is not loaded by default — the single most common source of errors when old scripts move to 3.x.
  • null: a placeholder provider that offers nothing, used for testing and special configurations.

Look at what your own machine actually loads:

openssl list -providers
openssl list -providers -verbose
openssl version -m        # MODULESDIR, where provider shared libraries live

-verbose prints each provider’s build information and status as well. Note that list -providers shows the set that is currently activated, not every .so file present on disk — a file can be present yet inactive, and its algorithms will still be unusable.

Fetching: A Query of Name Plus Properties

The second key concept is fetching: when an application needs an algorithm, it does not call a function directly. It submits a query to the framework — an algorithm name plus a property query string — and the framework picks a matching implementation from the activated providers. The most common properties are provider and fips:

openssl list -kem-algorithms -propquery "provider=default"
openssl list -kem-algorithms -propquery "fips=yes"

The first lists only KEM algorithms offered by the default provider; the second lists only algorithms carrying the FIPS property (and returns nothing if the fips provider is not activated). The practical consequence: the same algorithm name can resolve to different implementations under different fetch conditions. When a compliance scenario demands “FIPS implementations only”, the way to enforce it is to pin the property query in configuration or code, not to switch APIs. In code, a call like EVP_KEM_fetch(NULL, "ML-KEM-768", "fips=yes") applies exactly that discipline; command-line tools pass the same conditions through the configuration file or the -propquery option.

External Providers: Where oqsprovider Fits

Providers are an open slot that third parties can fill. The best-known example in the quantum-safe world is oqsprovider (maintained by the Open Quantum Safe project): before OpenSSL 3.5 shipped, installing this external provider on 3.x was the standard way to experiment with ML-KEM on a production-grade toolchain. It installs as a standalone .so and can be loaded two ways: by declaring and activating it in the provider section of openssl.cnf, or ad hoc for a single command:

OPENSSL_MODULES=/path/to/modules openssl list -providers \
  -provider default -provider oqsprovider

Most applications accept the -provider and -provider-path options — the former loads by name, the latter adds a search directory. Since 3.5 brought the native algorithms into default, oqsprovider’s role has shifted to offering experimental algorithms the standard has not yet adopted (such as additional signature candidates). This history matters: many post-quantum OpenSSL tutorials on the web were written before 3.5 and include oqsprovider in their steps — copying them onto 3.5 is unnecessary work. Check the version first, then decide whether you need it.

Where This Architecture Came From, and Why It Is Worth Adapting To

People who know the older versions may ask: the ENGINE mechanism in 1.1.1 worked fine, so why did 3.0 start over? Because ENGINE only covered part of the algorithm surface; large numbers of algorithms were still hard-coded in the main library, and replacing any piece — for hardware acceleration or a compliance implementation — meant patching. Providers unified the notion of an “implementation”: digests, symmetric ciphers, KEMs and signatures all go through the same registration and fetching pipeline, and FIPS validation only has to cover the boundary of the single fips module, so main-library upgrades no longer disturb the validated state. The direct benefit to users is substitutability: on one and the same machine, a lab environment can load oqsprovider to try new algorithms while a production configuration pins the fips property — both sharing the same APIs and commands, with no forked build to maintain for the special implementation.

The price is the confusion from the start of this article: with one more layer of indirection, “is it installed” and “can I use it” are separated by activation and fetching, and error messages became more abstract in step. The answer is not to route around it but to fix a checking routine — version first, then activated providers, then the fetch result for the specific algorithm. The inventory and troubleshooting articles later in this section are, in essence, expansions of that routine. One more detail worth knowing: if an application does not read any configuration file at all, OpenSSL falls back to “default behaviour” and loads default and base automatically — which is why everything works out of the box in a clean environment. But once a configuration file exists and declares a provider section, behaviour is governed entirely by that configuration. Understanding that switch explains many “same program, different behaviour on two machines” mysteries.

A complete example ties the three layers together. You run openssl genpkey -algorithm ML-KEM-768 on 3.5: the framework reads the configuration and confirms default is activated; it then fetches by the name ML-KEM-768 with default properties and hits the KEM implementation in default’s algorithm table; only then is the key actually generated. If the same machine had fips enabled and the fetch pinned fips=yes, while the fips provider did not offer ML-KEM at that time, the call would fail — command, arguments and machine unchanged; only the fetch conditions changed. Memorise this chain, and for any algorithm-availability problem you will immediately know which layer to inspect.

Summary

The provider architecture compresses into three sentences: algorithm implementations live in pluggable providers, with default as the workhorse, fips in charge of compliance, and legacy absent by default; applications fetch implementations by name plus properties, and configuration decides which providers are activated; when you hit “algorithm not found”, check the version and openssl list -providers first — nine times out of ten it is an unloaded provider or an insufficient version, not a mistyped command. In the next article we use this framework to take a complete inventory of a machine’s algorithm assets.

Tags: OpenSSLproviderFIPStroubleshooting