{
    "mode": "man",
    "parameter": "OSSL_PROVIDER-FIPS",
    "section": "7ssl",
    "url": "https://www.chedong.com/phpMan.php/man/OSSL_PROVIDER-FIPS/7ssl/json",
    "generated": "2026-06-03T01:48:41Z",
    "sections": {
        "NAME": {
            "content": "OSSLPROVIDER-FIPS - OpenSSL FIPS provider\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The OpenSSL FIPS provider is a special provider that conforms to the Federal Information\nProcessing Standards (FIPS) specified in FIPS 140-2. This 'module' contains an approved set\nof cryptographic algorithms that is validated by an accredited testing laboratory.\n",
            "subsections": [
                {
                    "name": "Properties",
                    "content": "The implementations in this provider specifically have these properties defined:\n\n\"provider=fips\"\n\"fips=yes\"\n\nIt may be used in a property query string with fetching functions such as EVPMDfetch(3) or\nEVPCIPHERfetch(3), as well as with other functions that take a property query string, such\nas EVPPKEYCTXnewfromname(3).\n\nIt isn't mandatory to query for any of these properties, except to make sure to get\nimplementations of this provider and none other.\n\nThe \"fips=yes\" property can be use to make sure only FIPS approved implementations are used\nfor crypto operations.  This may also include other non-crypto support operations that are\nnot in the fips provider, such as asymmetric key encoders, see \"Asymmetric Key Management\" in\nOSSLPROVIDER-default(7).\n"
                }
            ]
        },
        "OPERATIONS AND ALGORITHMS": {
            "content": "The OpenSSL FIPS provider supports these operations and algorithms:\n",
            "subsections": [
                {
                    "name": "Hashing Algorithms / Message Digests",
                    "content": "SHA1, see EVPMD-SHA1(7)\nSHA2, see EVPMD-SHA2(7)\nSHA3, see EVPMD-SHA3(7)\nKECCAK-KMAC, see EVPMD-KECCAK-KMAC(7)\n"
                },
                {
                    "name": "Symmetric Ciphers",
                    "content": "AES, see EVPCIPHER-AES(7)\nDES-EDE3 (TripleDES), see EVPCIPHER-DES(7)\n"
                },
                {
                    "name": "Message Authentication Code (MAC)",
                    "content": "CMAC, see EVPMAC-CMAC(7)\nGMAC, see EVPMAC-GMAC(7)\nHMAC, see EVPMAC-HMAC(7)\nKMAC, see EVPMAC-KMAC(7)\n"
                },
                {
                    "name": "Key Derivation Function (KDF)",
                    "content": "HKDF, see EVPKDF-HKDF(7)\nTLS13-KDF, see EVPKDF-TLS13KDF(7)\nSSKDF, see EVPKDF-SSKDF(7)\nPBKDF2, see EVPKDF-PBKDF2(7)\nSSHKDF, see EVPKDF-SSHKDF(7)\nTLS1-PRF, see EVPKDF-TLS1PRF(7)\nKBKDF, see EVPKDF-KBKDF(7)\nX942KDF-ASN1, see EVPKDF-X942-ASN1(7)\nX942KDF-CONCAT, see EVPKDF-X942-CONCAT(7)\nX963KDF, see EVPKDF-X963(7)\n"
                },
                {
                    "name": "Key Exchange",
                    "content": "DH, see EVPKEYEXCH-DH(7)\nECDH, see EVPKEYEXCH-ECDH(7)\nX25519, see EVPKEYEXCH-X25519(7)\nX448, see EVPKEYEXCH-X448(7)\n"
                },
                {
                    "name": "Asymmetric Signature",
                    "content": "DSA, see EVPKEYEXCH-DSA(7)\nRSA, see EVPSIGNATURE-RSA(7)\nX25519, see EVPSIGNATURE-ED25519(7)\nX448, see EVPSIGNATURE-ED448(7)\nHMAC, see EVPSIGNATURE-HMAC(7)\nCMAC, see EVPSIGNATURE-CMAC(7)\n"
                },
                {
                    "name": "Asymmetric Cipher",
                    "content": "RSA, see EVPKEYEXCH-RSA(7)\n"
                },
                {
                    "name": "Asymmetric Key Encapsulation",
                    "content": "RSA, see EVPKEM-RSA(7)\n"
                },
                {
                    "name": "Asymmetric Key Management",
                    "content": "DH, see EVPKEYMGMT-DH(7)\nDSA, see EVPKEYMGMT-DSA(7)\nRSA, see EVPKEYMGMT-RSA(7)\n"
                }
            ]
        },
        "SELF TESTING": {
            "content": "One of the requirements for the FIPS module is self testing. An optional callback mechanism\nis available to return information to the user using OSSLSELFTESTsetcallback(3).\n\nThe parameters passed to the callback are described in OSSLSELFTESTnew(3)\n\nThe OpenSSL FIPS module uses the following mechanism to provide information about the self\ntests as they run.  This is useful for debugging if a self test is failing.  The callback\nalso allows forcing any self test to fail, in order to check that it operates correctly on\nfailure.  Note that all self tests run even if a self test failure occurs.\n\nThe FIPS module passes the following type(s) to OSSLSELFTESTonbegin().\n\n\"ModuleIntegrity\" (OSSLSELFTESTTYPEMODULEINTEGRITY)\nUses HMAC SHA256 on the module file to validate that the module has not been modified.\nThe integrity value is compared to a value written to a configuration file during\ninstallation.\n\n\"InstallIntegrity\" (OSSLSELFTESTTYPEINSTALLINTEGRITY)\nUses HMAC SHA256 on a fixed string to validate that the installation process has already\nbeen performed and the self test KATS have already been tested, The integrity value is\ncompared to a value written to a configuration file after successfully running the self\ntests during installation.\n\n\"KATCipher\" (OSSLSELFTESTTYPEKATCIPHER)\nKnown answer test for a symmetric cipher.\n\n\"KATAsymmetricCipher\" (OSSLSELFTESTTYPEKATASYMCIPHER)\nKnown answer test for a asymmetric cipher.\n\n\"KATDigest\" (OSSLSELFTESTTYPEKATDIGEST)\nKnown answer test for a digest.\n\n\"KATSignature\" (OSSLSELFTESTTYPEKATSIGNATURE)\nKnown answer test for a signature.\n\n\"PCTSignature\" (OSSLSELFTESTTYPEPCTSIGNATURE)\nPairwise Consistency check for a signature.\n\n\"KATKDF\" (OSSLSELFTESTTYPEKATKDF)\nKnown answer test for a key derivation function.\n\n\"KATKA\" (OSSLSELFTESTTYPEKATKA)\nKnown answer test for key agreement.\n\n\"DRBG\" (OSSLSELFTESTTYPEDRBG)\nKnown answer test for a Deterministic Random Bit Generator.\n\n\"ConditionalPCT\" (OSSLSELFTESTTYPEPCT)\nConditional test that is run during the generation of key pairs.\n\n\"ContinuousRNGTest\" (OSSLSELFTESTTYPECRNG)\nContinuous random number generator test.\n\nThe \"ModuleIntegrity\" self test is always run at startup.  The \"InstallIntegrity\" self test\nis used to check if the self tests have already been run at installation time. If they have\nalready run then the self tests are not run on subsequent startups.  All other self test\ncategories are run once at installation time, except for the \"PairwiseConsistencyTest\".\n\nThere is only one instance of the \"ModuleIntegrity\" and \"InstallIntegrity\" self tests. All\nother self tests may have multiple instances.\n\nThe FIPS module passes the following descriptions(s) to OSSLSELFTESTonbegin().\n\n\"HMAC\" (OSSLSELFTESTDESCINTEGRITYHMAC)\n\"ModuleIntegrity\" and \"InstallIntegrity\" use this.\n\n\"RSA\" (OSSLSELFTESTDESCPCTRSAPKCS1)\n\"ECDSA\" (OSSLSELFTESTDESCPCTECDSA)\n\"DSA\" (OSSLSELFTESTDESCPCTDSA)\nKey generation tests used with the \"PairwiseConsistencyTest\" type.\n\n\"RSAEncrypt\" (OSSLSELFTESTDESCASYMRSAENC)\n\"RSADecrypt\" (OSSLSELFTESTDESCASYMRSADEC)\n\"KATAsymmetricCipher\" uses this to indicate an encrypt or decrypt KAT.\n\n\"AESGCM\" (OSSLSELFTESTDESCCIPHERAESGCM)\n\"AESECBDecrypt\" (OSSLSELFTESTDESCCIPHERAESECB)\n\"TDES\" (OSSLSELFTESTDESCCIPHERTDES)\nSymmetric cipher tests used with the \"KATCipher\" type.\n\n\"SHA1\" (OSSLSELFTESTDESCMDSHA1)\n\"SHA2\" (OSSLSELFTESTDESCMDSHA2)\n\"SHA3\" (OSSLSELFTESTDESCMDSHA3)\nDigest tests used with the \"KATDigest\" type.\n\n\"DSA\" (OSSLSELFTESTDESCSIGNDSA)\n\"RSA\" (OSSLSELFTESTDESCSIGNRSA)\n\"ECDSA\" (OSSLSELFTESTDESCSIGNECDSA)\nSignature tests used with the \"KATSignature\" type.\n\n\"ECDH\" (OSSLSELFTESTDESCKAECDH)\n\"DH\" (OSSLSELFTESTDESCKADH)\nKey agreement tests used with the \"KATKA\" type.\n\n\"HKDF\" (OSSLSELFTESTDESCKDFHKDF)\n\"TLS13KDFEXTRACT\" (OSSLSELFTESTDESCKDFTLS13EXTRACT)\n\"TLS13KDFEXPAND\" (OSSLSELFTESTDESCKDFTLS13EXPAND)\n\"SSKDF\" (OSSLSELFTESTDESCKDFSSKDF)\n\"X963KDF\" (OSSLSELFTESTDESCKDFX963KDF)\n\"X942KDF\" (OSSLSELFTESTDESCKDFX942KDF)\n\"PBKDF2\" (OSSLSELFTESTDESCKDFPBKDF2)\n\"SSHKDF\" (OSSLSELFTESTDESCKDFSSHKDF)\n\"TLS12PRF\" (OSSLSELFTESTDESCKDFTLS12PRF)\n\"KBKDF\" (OSSLSELFTESTDESCKDFKBKDF)\nKey Derivation Function tests used with the \"KATKDF\" type.\n\n\"CTR\" (OSSLSELFTESTDESCDRBGCTR)\n\"HASH\" (OSSLSELFTESTDESCDRBGHASH)\n\"HMAC\" (OSSLSELFTESTDESCDRBGHMAC)\nDRBG tests used with the \"DRBG\" type.\n\n= item \"RNG\" (OSSLSELFTESTDESCRNG)\n\n\"ContinuousRNGTest\" uses this.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "A simple self test callback is shown below for illustrative purposes.\n\n#include <openssl/selftest.h>\n\nstatic OSSLCALLBACK selftestcb;\n\nstatic int selftestcb(const OSSLPARAM params[], void *arg)\n{\nint ret = 0;\nconst OSSLPARAM *p = NULL;\nconst char *phase = NULL, *type = NULL, *desc = NULL;\n\np = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTPHASE);\nif (p == NULL || p->datatype != OSSLPARAMUTF8STRING)\ngoto err;\nphase = (const char *)p->data;\n\np = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTDESC);\nif (p == NULL || p->datatype != OSSLPARAMUTF8STRING)\ngoto err;\ndesc = (const char *)p->data;\n\np = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTTYPE);\nif (p == NULL || p->datatype != OSSLPARAMUTF8STRING)\ngoto err;\ntype = (const char *)p->data;\n\n/* Do some logging */\nif (strcmp(phase, OSSLSELFTESTPHASESTART) == 0)\nBIOprintf(bioout, \"%s : (%s) : \", desc, type);\nif (strcmp(phase, OSSLSELFTESTPHASEPASS) == 0\n|| strcmp(phase, OSSLSELFTESTPHASEFAIL) == 0)\nBIOprintf(bioout, \"%s\\n\", phase);\n\n/* Corrupt the SHA1 self test during the 'corrupt' phase by returning 0 */\nif (strcmp(phase, OSSLSELFTESTPHASECORRUPT) == 0\n&& strcmp(desc, OSSLSELFTESTDESCMDSHA1) == 0) {\nBIOprintf(bioout, \"%s %s\", phase, desc);\nreturn 0;\n}\nret = 1;\nerr:\nreturn ret;\n}\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "openssl-fipsinstall(1), fipsconfig(5), OSSLSELFTESTsetcallback(3),\nOSSLSELFTESTnew(3), OSSLPARAM(3), openssl-core.h(7), openssl-coredispatch.h(7),\nprovider(7)\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The type and functions described here were added in OpenSSL 3.0.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-04-07                     OSSLPROVIDER-FIPS(7SSL)",
            "subsections": []
        }
    },
    "summary": "OSSLPROVIDER-FIPS - OpenSSL FIPS provider",
    "flags": [],
    "examples": [
        "A simple self test callback is shown below for illustrative purposes.",
        "#include <openssl/selftest.h>",
        "static OSSLCALLBACK selftestcb;",
        "static int selftestcb(const OSSLPARAM params[], void *arg)",
        "int ret = 0;",
        "const OSSLPARAM *p = NULL;",
        "const char *phase = NULL, *type = NULL, *desc = NULL;",
        "p = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTPHASE);",
        "if (p == NULL || p->datatype != OSSLPARAMUTF8STRING)",
        "goto err;",
        "phase = (const char *)p->data;",
        "p = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTDESC);",
        "if (p == NULL || p->datatype != OSSLPARAMUTF8STRING)",
        "goto err;",
        "desc = (const char *)p->data;",
        "p = OSSLPARAMlocateconst(params, OSSLPROVPARAMSELFTESTTYPE);",
        "if (p == NULL || p->datatype != OSSLPARAMUTF8STRING)",
        "goto err;",
        "type = (const char *)p->data;",
        "/* Do some logging */",
        "if (strcmp(phase, OSSLSELFTESTPHASESTART) == 0)",
        "BIOprintf(bioout, \"%s : (%s) : \", desc, type);",
        "if (strcmp(phase, OSSLSELFTESTPHASEPASS) == 0",
        "|| strcmp(phase, OSSLSELFTESTPHASEFAIL) == 0)",
        "BIOprintf(bioout, \"%s\\n\", phase);",
        "/* Corrupt the SHA1 self test during the 'corrupt' phase by returning 0 */",
        "if (strcmp(phase, OSSLSELFTESTPHASECORRUPT) == 0",
        "&& strcmp(desc, OSSLSELFTESTDESCMDSHA1) == 0) {",
        "BIOprintf(bioout, \"%s %s\", phase, desc);",
        "return 0;",
        "ret = 1;",
        "err:",
        "return ret;"
    ],
    "see_also": [
        {
            "name": "openssl-fipsinstall",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/openssl-fipsinstall/1/json"
        },
        {
            "name": "fipsconfig",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/fipsconfig/5/json"
        },
        {
            "name": "OSSLSELFTESTsetcallback",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSELFTESTsetcallback/3/json"
        },
        {
            "name": "OSSLSELFTESTnew",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSELFTESTnew/3/json"
        },
        {
            "name": "OSSLPARAM",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLPARAM/3/json"
        },
        {
            "name": "openssl-core.h",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/openssl-core.h/7/json"
        },
        {
            "name": "openssl-coredispatch.h",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/openssl-coredispatch.h/7/json"
        },
        {
            "name": "provider",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/provider/7/json"
        }
    ]
}