OSSL_PROVIDER-FIPS(7ossl)
π OSSL_PROVIDER-FIPS β the OpenSSL FIPS provider (7ossl)
okay so bestie, grab a strawberry drink π because we're about to talk about the vibes-iest provider in all of OpenSSL. This is OSSL_PROVIDER-FIPS, page seven of the OpenSSL manual, and she is that girl.
β¨ NAME β¨
OSSL_PROVIDER-FIPS β the OpenSSL FIPS provider π
πΈ DESCRIPTION πΈ
The OpenSSL FIPS provider is a special provider β like, main character energy special β that conforms to the Federal Information Processing Standards (FIPS) specified in FIPS 140-3. This 'module' contains an approved set of cryptographic algorithms that is validated by an accredited testing laboratory. No cap, she got certified. π
π¦ Properties π¦
The implementations in this provider specifically have these properties defined:
"provider=fips"
"fips=yes"
You can absolutely use these in a property query string with fetching functions such as EVP_MD_fetch(3) or EVP_CIPHER_fetch(3), and also with other functions that take a property query string, like EVP_PKEY_CTX_new_from_name(3). iykyk.
To be FIPS compliant, it is mandatory to include "fips=yes" as part of all property queries. This is the whole point, fr fr β it ensures that only FIPS approved implementations are used for cryptographic operations. The "fips=yes" query may also include other non-crypto support operations that are not in the FIPS provider, such as asymmetric key encoders β see "Asymmetric Key Management" in OSSL_PROVIDER-default(7) for the deets.
It is not mandatory to include "provider=fips" as part of your property query. But lowkey, including "provider=fips" in your property query guarantees that the OpenSSL FIPS provider is used for cryptographic operations rather than other FIPS capable providers. It's giving "extra safety, extra slay". π
π§ Provider parameters π§
See "Provider parameters" in provider-base(7) for a list of base parameters. Additionally the OpenSSL FIPS provider also supports the following gettable parameters:
"security-checks"(OSSL_OSSL_PROV_PARAM_SECURITY_CHECKS)<unsigned integer>β for further information refer to theopenssl-fipsinstall(1)option-no_security_checks.
π₯ OPERATIONS AND ALGORITHMS π₯
The OpenSSL FIPS provider supports these operations and algorithms β buckle up bestie, it's a long list and every single one is here:
π Hashing Algorithms / Message Digests π
- SHA1, see
EVP_MD-SHA1(7) - SHA2, see
EVP_MD-SHA2(7) - SHA3, see
EVP_MD-SHA3(7) - KECCAK-KMAC, see
EVP_MD-KECCAK-KMAC(7) - SHAKE, see
EVP_MD-SHAKE(7)
π Symmetric Ciphers π
- AES, see
EVP_CIPHER-AES(7) - 3DES, see
EVP_CIPHER-DES(7)- β οΈ This is an unapproved algorithm.
π Message Authentication Code (MAC) π
- CMAC, see
EVP_MAC-CMAC(7) - GMAC, see
EVP_MAC-GMAC(7) - HMAC, see
EVP_MAC-HMAC(7) - KMAC, see
EVP_MAC-KMAC(7)
π Key Derivation Function (KDF) π
- HKDF, see
EVP_KDF-HKDF(7) - TLS13-KDF, see
EVP_KDF-TLS13_KDF(7) - SSKDF, see
EVP_KDF-SS(7) - PBKDF2, see
EVP_KDF-PBKDF2(7) - SSHKDF, see
EVP_KDF-SSHKDF(7) - TLS1-PRF, see
EVP_KDF-TLS1_PRF(7) - KBKDF, see
EVP_KDF-KB(7) - X942KDF-ASN1, see
EVP_KDF-X942-ASN1(7) - X942KDF-CONCAT, see
EVP_KDF-X942-CONCAT(7) - X963KDF, see
EVP_KDF-X963(7)
π¦ Key Exchange π¦
- DH, see
EVP_KEYEXCH-DH(7) - ECDH, see
EVP_KEYEXCH-ECDH(7) - X25519, see
EVP_KEYEXCH-X25519(7) - X448, see
EVP_KEYEXCH-X448(7) - ML-KEM, see
EVP_KEM-ML-KEM(7) - TLS1-PRF
- HKDF
β Asymmetric Signature β
- RSA, see
EVP_SIGNATURE-RSA(7)- π£ The X931 padding mode
"OSSL_PKEY_RSA_PAD_MODE_X931"is no longer supported for signature generation, but may be used for verification for legacy use cases. (This is a FIPS 140-3 requirement.) So she can check your vibes but she will not be signing off on them, periodt.
- π£ The X931 padding mode
- DSA, see
EVP_SIGNATURE-DSA(7) - ED25519, see
EVP_SIGNATURE-ED25519(7) - ED448, see
EVP_SIGNATURE-ED448(7) - ECDSA, see
EVP_SIGNATURE-ECDSA(7) - ML-DSA-44, see
EVP_SIGNATURE-ML-DSA(7) - ML-DSA-65, see
EVP_SIGNATURE-ML-DSA(7) - ML-DSA-87, see
EVP_SIGNATURE-ML-DSA(7) - SLH-DSA, see
EVP_SIGNATURE-SLH-DSA(7) - HMAC, see
EVP_SIGNATURE-HMAC(7) - CMAC, see
EVP_SIGNATURE-CMAC(7)
π Asymmetric Cipher π
- RSA, see
EVP_ASYM_CIPHER-RSA(7)
πΈ Asymmetric Key Encapsulation πΈ
- RSA, see
EVP_KEM-RSA(7)
π Asymmetric Key Management π
- DH, see
EVP_KEYMGMT-DH(7) - DHX, see
EVP_KEYMGMT-DHX(7) - DSA, see
EVP_KEYMGMT-DSA(7) - RSA, see
EVP_KEYMGMT-RSA(7) - RSA-PSS
- EC, see
EVP_KEYMGMT-EC(7) - X25519, see
EVP_KEYMGMT-X25519(7)- β οΈ This is an unapproved algorithm.
- X448, see
EVP_KEYMGMT-X448(7)- β οΈ This is an unapproved algorithm.
- ED25519, see
EVP_KEYMGMT-ED25519(7)- β οΈ This is an unapproved algorithm.
- ED448, see
EVP_KEYMGMT-ED448(7)- β οΈ This is an unapproved algorithm.
- TLS1-PRF
- HKDF
- HMAC, see
EVP_KEYMGMT-HMAC(7) - CMAC, see
EVP_KEYMGMT-CMAC(7) - ML-DSA-44, see
EVP_KEYMGMT-ML-DSA(7) - ML-DSA-65, see
EVP_KEYMGMT-ML-DSA(7) - ML-DSA-87, see
EVP_KEYMGMT-ML-DSA(7) - SLH-DSA-SHA2-128s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHA2-128f, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHA2-192s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHA2-192f, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHA2-256s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHA2-256f, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-128s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-128f, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-192s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-192f, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-256s, see
EVP_KEYMGMT-SLH-DSA(7) - SLH-DSA-SHAKE-256f, see
EVP_KEYMGMT-SLH-DSA(7)
π² Random Number Generation π²
- CRNG-TEST, see
EVP_RAND-CRNG-TEST(7) - CTR-DRBG, see
EVP_RAND-CTR-DRBG(7) - HASH-DRBG, see
EVP_RAND-HASH-DRBG(7) - HMAC-DRBG, see
EVP_RAND-HMAC-DRBG(7) - TEST-RAND, see
EVP_RAND-TEST-RAND(7)- β οΈ TEST-RAND is an unapproved algorithm.
okay and we are NOT done yet bestie, there's more coming π part 2 is right there, keep reading ππ
β¨ SELF TESTING β¨
ok bestie, one of the non-negotiables for the FIPS module is self testing β like, it has to check itself. and good news: there's an optional callback mechanism you can use to get info back, via OSSL_SELF_TEST_set_callback(3). π
the parameters that get passed to the callback are described in OSSL_SELF_TEST_new(3).
the OpenSSL FIPS module uses the following mechanism to hand you info about the self tests while they run. super useful for debugging if a self test is failing ngl. the callback also lets you force any self test to fail, so you can check that it behaves right on failure. and note this: all self tests run even if a self test failure occurs. π
The FIPS module passes the following type(s) to OSSL_SELF_TEST_onbegin().
"Module_Integrity"(OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY) β Uses HMAC SHA256 on the module file to validate that the module has not been modified. The integrity value is compared to a value written to a configuration file during installation."Install_Integrity"(OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY) β Uses HMAC SHA256 on a fixed string to validate that the installation process has already been performed and the self test KATS have already been tested, The integrity value is compared to a value written to a configuration file after successfully running the self tests during installation."KAT_Cipher"(OSSL_SELF_TEST_TYPE_KAT_CIPHER) β Known answer test for a symmetric cipher."KAT_AsymmetricCipher"(OSSL_SELF_TEST_TYPE_KAT_ASYM_CIPHER) β Known answer test for a asymmetric cipher."KAT_Digest"(OSSL_SELF_TEST_TYPE_KAT_DIGEST) β Known answer test for a digest."KAT_AsymmetricKeyGeneration"(OSSL_SELF_TEST_TYPE_KAT_ASYM_KEYGEN) β Known answer test for asymmetric key generation."KAT_Signature"(OSSL_SELF_TEST_TYPE_KAT_SIGNATURE) β Known answer test for a signature."PCT_Signature"(OSSL_SELF_TEST_TYPE_PCT_SIGNATURE) β Pairwise Consistency check for a signature."KAT_KDF"(OSSL_SELF_TEST_TYPE_KAT_KDF) β Known answer test for a key derivation function."KAT_KA"(OSSL_SELF_TEST_TYPE_KAT_KA) β Known answer test for key agreement."KAT_KEM"(OSSL_SELF_TEST_TYPE_KAT_KEM) β Known answer test for key encapsulation."DRBG"(OSSL_SELF_TEST_TYPE_DRBG) β Known answer test for a Deterministic Random Bit Generator."Conditional_PCT"(OSSL_SELF_TEST_TYPE_PCT) β Conditional test that is run during the generation or importing of key pairs."Continuous_RNG_Test"(OSSL_SELF_TEST_TYPE_CRNG) β Continuous random number generator test.
so here's the schedule, bestie π
The "Module_Integrity" self test is always run at startup. The "Install_Integrity" self test is used to check if the self tests have already been run at installation time. If they have already run, then the self tests are not run on subsequent startups. All other self test categories are run once at installation time, except for the "Pairwise_Consistency_Test".
also: there is only one instance of the "Module_Integrity" and "Install_Integrity" self tests. All other self tests may have multiple instances. π«Ά
The FIPS module passes the following descriptions(s) to OSSL_SELF_TEST_onbegin().
"HMAC"(OSSL_SELF_TEST_DESC_INTEGRITY_HMAC) β"Module_Integrity"and"Install_Integrity"use this."RSA"(OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1)"RSA"(OSSL_SELF_TEST_DESC_PCT_RSA)"ECDSA"(OSSL_SELF_TEST_DESC_PCT_ECDSA)"EDDSA"(OSSL_SELF_TEST_DESC_PCT_EDDSA)"DSA"(OSSL_SELF_TEST_DESC_PCT_DSA)"ML-DSA"(OSSL_SELF_TEST_DESC_PCT_ML_DSA)"ML-KEM"(OSSL_SELF_TEST_DESC_PCT_ML_KEM)"SLH-DSA"(OSSL_SELF_TEST_DESC_PCT_SLH_DSA)
β³ Key generation tests used with the "Pairwise_Consistency_Test" type.
"RSA_Encrypt"(OSSL_SELF_TEST_DESC_ASYM_RSA_ENC)"RSA_Decrypt"(OSSL_SELF_TEST_DESC_ASYM_RSA_DEC)
β³ "KAT_AsymmetricCipher" uses this to indicate an encrypt or decrypt KAT.
"ML-DSA"(OSSL_SELF_TEST_DESC_KEYGEN_ML_DSA)"ML-KEM"(OSSL_SELF_TEST_DESC_KEYGEN_ML_KEM)"SLH-DSA"(OSSL_SELF_TEST_DESC_KEYGEN_SLH_DSA)
β³ "KAT_AsymmetricKeyGeneration" uses this to indicate a key generation KAT.
"AES_GCM"(OSSL_SELF_TEST_DESC_CIPHER_AES_GCM)"AES_ECB_Decrypt"(OSSL_SELF_TEST_DESC_CIPHER_AES_ECB)"TDES"(OSSL_SELF_TEST_DESC_CIPHER_TDES)
β³ Symmetric cipher tests used with the "KAT_Cipher" type.
"SHA1"(OSSL_SELF_TEST_DESC_MD_SHA1)"SHA2"(OSSL_SELF_TEST_DESC_MD_SHA2)"SHA3"(OSSL_SELF_TEST_DESC_MD_SHA3)
β³ Digest tests used with the "KAT_Digest" type.
"DSA"(OSSL_SELF_TEST_DESC_SIGN_DSA)"RSA"(OSSL_SELF_TEST_DESC_SIGN_RSA)"ECDSA"(OSSL_SELF_TEST_DESC_SIGN_ECDSA)"EDDSA"(OSSL_SELF_TEST_DESC_SIGN_EDDSA)"ML-DSA"(OSSL_SELF_TEST_DESC_SIGN_ML_DSA)"SLH-DSA"(OSSL_SELF_TEST_DESC_SIGN_SLH_DSA)
β³ Signature tests used with the "KAT_Signature" type.
"ECDH"(OSSL_SELF_TEST_DESC_KA_ECDH)"DH"(OSSL_SELF_TEST_DESC_KA_DH)
β³ Key agreement tests used with the "KAT_KA" type.
"HKDF"(OSSL_SELF_TEST_DESC_KDF_HKDF)"TLS13_KDF_EXTRACT"(OSSL_SELF_TEST_DESC_KDF_TLS13_EXTRACT)"TLS13_KDF_EXPAND"(OSSL_SELF_TEST_DESC_KDF_TLS13_EXPAND)"SSKDF"(OSSL_SELF_TEST_DESC_KDF_SSKDF)"X963KDF"(OSSL_SELF_TEST_DESC_KDF_X963KDF)"X942KDF"(OSSL_SELF_TEST_DESC_KDF_X942KDF)"PBKDF2"(OSSL_SELF_TEST_DESC_KDF_PBKDF2)"SSHKDF"(OSSL_SELF_TEST_DESC_KDF_SSHKDF)"TLS12_PRF"(OSSL_SELF_TEST_DESC_KDF_TLS12_PRF)"KBKDF"(OSSL_SELF_TEST_DESC_KDF_KBKDF)
β³ Key Encapsulation Function tests used with the "KAT_KEM" type.
"KEM_Encap"(OSSL_SELF_TEST_DESC_ENCAP_KEM)"KEM_Decap"(OSSL_SELF_TEST_DESC_DECAP_KEM)"KEM_Decap_Reject"(OSSL_SELF_TEST_DESC_DECAP_REJ_KEM)
β³ Key Derivation Function tests used with the "KAT_KDF" type.
"CTR"(OSSL_SELF_TEST_DESC_DRBG_CTR)"HASH"(OSSL_SELF_TEST_DESC_DRBG_HASH)"HMAC"(OSSL_SELF_TEST_DESC_DRBG_HMAC)
β³ DRBG tests used with the "DRBG" type.
"RNG"(OSSL_SELF_TEST_DESC_RNG)
β³ "Continuous_RNG_Test" uses this.
πΈ EXAMPLES πΈ
a simple self test callback is shown below for illustrative purposes. it's giving "hello world but make it FIPS" π
#include <openssl/self_test.h>
static OSSL_CALLBACK self_test_cb;
static int self_test_cb(const OSSL_PARAM params[], void *arg)
{
int ret = 0;
const OSSL_PARAM *p = NULL;
const char *phase = NULL, *type = NULL, *desc = NULL;
p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_PHASE);
if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING)
goto err;
phase = (const char *)p->data;
p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_DESC);
if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING)
goto err;
desc = (const char *)p->data;
p = OSSL_PARAM_locate_const(params, OSSL_PROV_PARAM_SELF_TEST_TYPE);
if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING)
goto err;
type = (const char *)p->data;
/* Do some logging */
if (strcmp(phase, OSSL_SELF_TEST_PHASE_START) == 0)
BIO_printf(bio_out, "%s : (%s) : ", desc, type);
if (strcmp(phase, OSSL_SELF_TEST_PHASE_PASS) == 0
|| strcmp(phase, OSSL_SELF_TEST_PHASE_FAIL) == 0)
BIO_printf(bio_out, "%s\n", phase);
/* Corrupt the SHA1 self test during the 'corrupt' phase by returning 0 */
if (strcmp(phase, OSSL_SELF_TEST_PHASE_CORRUPT) == 0
&& strcmp(desc, OSSL_SELF_TEST_DESC_MD_SHA1) == 0) {
BIO_printf(bio_out, "%s %s", phase, desc);
return 0;
}
ret = 1;
err:
return ret;
}
π NOTES π
ok real talk bestie, this part matters π
Some released versions of OpenSSL do not include a validated FIPS provider. To determine which versions have undergone the validation process, please refer to the OpenSSL Downloads page <https://www.openssl.org/source/>. If you require FIPS-approved functionality, it is essential to build your FIPS provider using one of the validated versions listed there. Normally, it is possible to utilize a FIPS provider constructed from one of the validated versions alongside libcrypto and libssl compiled from any release within the same major release series. That flexibility is what lets you address bug fixes and CVEs that fall outside the FIPS boundary. π¦
The FIPS provider in OpenSSL 3.1 includes some non-FIPS validated algorithms, consequently the property query "fips=yes" is mandatory for applications that want to operate in a FIPS approved manner. The algorithms are:
- Triple DES ECB
- Triple DES CBC
- EdDSA
π SEE ALSO π
fips_config(5), OSSL_SELF_TEST_set_callback(3), OSSL_SELF_TEST_new(3), OSSL_PARAM(3), openssl-core.h(7), openssl-core_dispatch.h(7), provider(7), <https://www.openssl.org/source/>
π HISTORY π
This functionality was added in OpenSSL 3.0. β
π COPYRIGHT π
Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page, bestie, you ate that π«Ά this was version 3.5.0, dated 2026-09-25, OSSL_PROVIDER-FIPS(7ossl) β go forth and self-test responsibly πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms