xref: /freebsd/secure/lib/libcrypto/man/man7/OSSL_PROVIDER-FIPS.7 (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "OSSL_PROVIDER-FIPS 7"
OSSL_PROVIDER-FIPS 7 "2023-08-01" "3.0.10" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
OSSL_PROVIDER-FIPS - OpenSSL FIPS provider
"DESCRIPTION"
Header "DESCRIPTION" The OpenSSL \s-1FIPS\s0 provider is a special provider that conforms to the Federal Information Processing Standards (\s-1FIPS\s0) specified in \s-1FIPS 140-2.\s0 This 'module' contains an approved set of cryptographic algorithms that is validated by an accredited testing laboratory.
"Properties"
Subsection "Properties" The implementations in this provider specifically have these properties defined: Item "provider=fips"

0 Item "fips=yes"

It may be used in a property query string with fetching functions such as \fBEVP_MD_fetch\|(3) or EVP_CIPHER_fetch\|(3), as well as with other functions that take a property query string, such as \fBEVP_PKEY_CTX_new_from_name\|(3).

It isn't mandatory to query for any of these properties, except to make sure to get implementations of this provider and none other.

The \*(L"fips=yes\*(R" property can be use to make sure only \s-1FIPS\s0 approved implementations are used for crypto operations. This may also include other non-crypto support operations that are not in the \s-1FIPS\s0 provider, such as asymmetric key encoders, see \*(L"Asymmetric Key Management\*(R" in OSSL_PROVIDER-default\|(7).

"OPERATIONS AND ALGORITHMS"
Header "OPERATIONS AND ALGORITHMS" The OpenSSL \s-1FIPS\s0 provider supports these operations and algorithms:
"Hashing Algorithms / Message Digests"
Subsection "Hashing Algorithms / Message Digests"
"\s-1SHA1,\s0 see \s-1EVP_MD-SHA1\s0\|(7)" 4
Item "SHA1, see EVP_MD-SHA1"

0

"\s-1SHA2,\s0 see \s-1EVP_MD-SHA2\s0\|(7)" 4
Item "SHA2, see EVP_MD-SHA2"
"\s-1SHA3,\s0 see \s-1EVP_MD-SHA3\s0\|(7)" 4
Item "SHA3, see EVP_MD-SHA3"
"KECCAK-KMAC, see \s-1EVP_MD-KECCAK-KMAC\s0\|(7)" 4
Item "KECCAK-KMAC, see EVP_MD-KECCAK-KMAC"

"Symmetric Ciphers"
Subsection "Symmetric Ciphers"
"\s-1AES,\s0 see \s-1EVP_CIPHER-AES\s0\|(7)" 4
Item "AES, see EVP_CIPHER-AES"

0

"\s-1DES-EDE3\s0 (TripleDES), see \s-1EVP_CIPHER-DES\s0\|(7)" 4
Item "DES-EDE3 (TripleDES), see EVP_CIPHER-DES"

"Message Authentication Code (\s-1MAC\s0)"
Subsection "Message Authentication Code (MAC)"
"\s-1CMAC,\s0 see \s-1EVP_MAC-CMAC\s0\|(7)" 4
Item "CMAC, see EVP_MAC-CMAC"

0

"\s-1GMAC,\s0 see \s-1EVP_MAC-GMAC\s0\|(7)" 4
Item "GMAC, see EVP_MAC-GMAC"
"\s-1HMAC,\s0 see \s-1EVP_MAC-HMAC\s0\|(7)" 4
Item "HMAC, see EVP_MAC-HMAC"
"\s-1KMAC,\s0 see \s-1EVP_MAC-KMAC\s0\|(7)" 4
Item "KMAC, see EVP_MAC-KMAC"

"Key Derivation Function (\s-1KDF\s0)"
Subsection "Key Derivation Function (KDF)"
"\s-1HKDF,\s0 see \s-1EVP_KDF-HKDF\s0\|(7)" 4
Item "HKDF, see EVP_KDF-HKDF"

0

"\s-1TLS13-KDF,\s0 see \s-1EVP_KDF-TLS13_KDF\s0\|(7)" 4
Item "TLS13-KDF, see EVP_KDF-TLS13_KDF"
"\s-1SSKDF,\s0 see \s-1EVP_KDF-SS\s0\|(7)" 4
Item "SSKDF, see EVP_KDF-SS"
"\s-1PBKDF2,\s0 see \s-1EVP_KDF-PBKDF2\s0\|(7)" 4
Item "PBKDF2, see EVP_KDF-PBKDF2"
"\s-1SSHKDF,\s0 see \s-1EVP_KDF-SSHKDF\s0\|(7)" 4
Item "SSHKDF, see EVP_KDF-SSHKDF"
"\s-1TLS1-PRF,\s0 see \s-1EVP_KDF-TLS1_PRF\s0\|(7)" 4
Item "TLS1-PRF, see EVP_KDF-TLS1_PRF"
"\s-1KBKDF,\s0 see \s-1EVP_KDF-KB\s0\|(7)" 4
Item "KBKDF, see EVP_KDF-KB"
"X942KDF-ASN1, see \s-1EVP_KDF-X942-ASN1\s0\|(7)" 4
Item "X942KDF-ASN1, see EVP_KDF-X942-ASN1"
"X942KDF-CONCAT, see \s-1EVP_KDF-X942-CONCAT\s0\|(7)" 4
Item "X942KDF-CONCAT, see EVP_KDF-X942-CONCAT"
"X963KDF, see \s-1EVP_KDF-X963\s0\|(7)" 4
Item "X963KDF, see EVP_KDF-X963"

"Key Exchange"
Subsection "Key Exchange"
"\s-1DH,\s0 see \s-1EVP_KEYEXCH-DH\s0\|(7)" 4
Item "DH, see EVP_KEYEXCH-DH"

0

"\s-1ECDH,\s0 see \s-1EVP_KEYEXCH-ECDH\s0\|(7)" 4
Item "ECDH, see EVP_KEYEXCH-ECDH"
"X25519, see \s-1EVP_KEYEXCH-X25519\s0\|(7)" 4
Item "X25519, see EVP_KEYEXCH-X25519"
"X448, see \s-1EVP_KEYEXCH-X448\s0\|(7)" 4
Item "X448, see EVP_KEYEXCH-X448"

"Asymmetric Signature"
Subsection "Asymmetric Signature"
"\s-1RSA,\s0 see \s-1EVP_SIGNATURE-RSA\s0\|(7)" 4
Item "RSA, see EVP_SIGNATURE-RSA"

0

"X25519, see \s-1EVP_SIGNATURE-ED25519\s0\|(7)" 4
Item "X25519, see EVP_SIGNATURE-ED25519"
"X448, see \s-1EVP_SIGNATURE-ED448\s0\|(7)" 4
Item "X448, see EVP_SIGNATURE-ED448"
"\s-1HMAC,\s0 see \s-1EVP_SIGNATURE-HMAC\s0\|(7)" 4
Item "HMAC, see EVP_SIGNATURE-HMAC"
"\s-1CMAC,\s0 see \s-1EVP_SIGNATURE-CMAC\s0\|(7)" 4
Item "CMAC, see EVP_SIGNATURE-CMAC"

"Asymmetric Cipher"
Subsection "Asymmetric Cipher"
"\s-1RSA,\s0 see \s-1EVP_ASYM_CIPHER-RSA\s0\|(7)" 4
Item "RSA, see EVP_ASYM_CIPHER-RSA"
"Asymmetric Key Encapsulation"
Subsection "Asymmetric Key Encapsulation"

0

"\s-1RSA,\s0 see \s-1EVP_KEM-RSA\s0\|(7)" 4
Item "RSA, see EVP_KEM-RSA"

"Asymmetric Key Management"
Subsection "Asymmetric Key Management"
"\s-1DH,\s0 see \s-1EVP_KEYMGMT-DH\s0\|(7)" 4
Item "DH, see EVP_KEYMGMT-DH"

0

"\s-1DHX,\s0 see \s-1EVP_KEYMGMT-DHX\s0\|(7)" 4
Item "DHX, see EVP_KEYMGMT-DHX"
"\s-1DSA,\s0 see \s-1EVP_KEYMGMT-DSA\s0\|(7)" 4
Item "DSA, see EVP_KEYMGMT-DSA"
"\s-1RSA,\s0 see \s-1EVP_KEYMGMT-RSA\s0\|(7)" 4
Item "RSA, see EVP_KEYMGMT-RSA"
"\s-1EC,\s0 see \s-1EVP_KEYMGMT-EC\s0\|(7)" 4
Item "EC, see EVP_KEYMGMT-EC"
"X25519, see \s-1EVP_KEYMGMT-X25519\s0\|(7)" 4
Item "X25519, see EVP_KEYMGMT-X25519"
"X448, see \s-1EVP_KEYMGMT-X448\s0\|(7)" 4
Item "X448, see EVP_KEYMGMT-X448"

"Random Number Generation"
Subsection "Random Number Generation"
"CTR-DRBG, see \s-1EVP_RAND-CTR-DRBG\s0\|(7)" 4
Item "CTR-DRBG, see EVP_RAND-CTR-DRBG"

0

"HASH-DRBG, see \s-1EVP_RAND-HASH-DRBG\s0\|(7)" 4
Item "HASH-DRBG, see EVP_RAND-HASH-DRBG"
"HMAC-DRBG, see \s-1EVP_RAND-HMAC-DRBG\s0\|(7)" 4
Item "HMAC-DRBG, see EVP_RAND-HMAC-DRBG"
"TEST-RAND, see \s-1EVP_RAND-TEST-RAND\s0\|(7)" 4
Item "TEST-RAND, see EVP_RAND-TEST-RAND"

TEST-RAND is an unapproved algorithm.

"SELF TESTING"
Header "SELF TESTING" One of the requirements for the \s-1FIPS\s0 module is self testing. An optional callback mechanism is available to return information to the user using \fBOSSL_SELF_TEST_set_callback\|(3).

The parameters passed to the callback are described in OSSL_SELF_TEST_new\|(3)

The OpenSSL \s-1FIPS\s0 module uses the following mechanism to provide information about the self tests as they run. This is useful for debugging if a self test is failing. The callback also allows forcing any self test to fail, in order to check that it operates correctly on failure. Note that all self tests run even if a self test failure occurs.

The \s-1FIPS\s0 module passes the following type(s) to OSSL_SELF_TEST_onbegin(). Item "Module_Integrity (OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY)" Uses \s-1HMAC SHA256\s0 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. Item "Install_Integrity (OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY)" Uses \s-1HMAC SHA256\s0 on a fixed string to validate that the installation process has already been performed and the self test \s-1KATS\s0 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. Item "KAT_Cipher (OSSL_SELF_TEST_TYPE_KAT_CIPHER)" Known answer test for a symmetric cipher. Item "KAT_AsymmetricCipher (OSSL_SELF_TEST_TYPE_KAT_ASYM_CIPHER)" Known answer test for a asymmetric cipher. Item "KAT_Digest (OSSL_SELF_TEST_TYPE_KAT_DIGEST)" Known answer test for a digest. Item "KAT_Signature (OSSL_SELF_TEST_TYPE_KAT_SIGNATURE)" Known answer test for a signature. Item "PCT_Signature (OSSL_SELF_TEST_TYPE_PCT_SIGNATURE)" Pairwise Consistency check for a signature. Item "KAT_KDF (OSSL_SELF_TEST_TYPE_KAT_KDF)" Known answer test for a key derivation function. Item "KAT_KA (OSSL_SELF_TEST_TYPE_KAT_KA)" Known answer test for key agreement. Item "DRBG (OSSL_SELF_TEST_TYPE_DRBG)" Known answer test for a Deterministic Random Bit Generator. Item "Conditional_PCT (OSSL_SELF_TEST_TYPE_PCT)" Conditional test that is run during the generation of key pairs. Item "Continuous_RNG_Test (OSSL_SELF_TEST_TYPE_CRNG)" Continuous random number generator test.

The \*(L"Module_Integrity\*(R" self test is always run at startup. The \*(L"Install_Integrity\*(R" 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 \*(L"Pairwise_Consistency_Test\*(R".

There is only one instance of the \*(L"Module_Integrity\*(R" and \*(L"Install_Integrity\*(R" self tests. All other self tests may have multiple instances.

The \s-1FIPS\s0 module passes the following descriptions(s) to OSSL_SELF_TEST_onbegin(). Item "HMAC (OSSL_SELF_TEST_DESC_INTEGRITY_HMAC)" \*(L"Module_Integrity\*(R" and \*(L"Install_Integrity\*(R" use this. Item "RSA (OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1)"

0 Item "ECDSA (OSSL_SELF_TEST_DESC_PCT_ECDSA)" Item "DSA (OSSL_SELF_TEST_DESC_PCT_DSA)"

Key generation tests used with the \*(L"Pairwise_Consistency_Test\*(R" type. Item "RSA_Encrypt (OSSL_SELF_TEST_DESC_ASYM_RSA_ENC)"

0 Item "RSA_Decrypt (OSSL_SELF_TEST_DESC_ASYM_RSA_DEC)"

\*(L"KAT_AsymmetricCipher\*(R" uses this to indicate an encrypt or decrypt \s-1KAT.\s0 Item "AES_GCM (OSSL_SELF_TEST_DESC_CIPHER_AES_GCM)"

0 Item "AES_ECB_Decrypt (OSSL_SELF_TEST_DESC_CIPHER_AES_ECB)" Item "TDES (OSSL_SELF_TEST_DESC_CIPHER_TDES)"

Symmetric cipher tests used with the \*(L"KAT_Cipher\*(R" type. Item "SHA1 (OSSL_SELF_TEST_DESC_MD_SHA1)"

0 Item "SHA2 (OSSL_SELF_TEST_DESC_MD_SHA2)" Item "SHA3 (OSSL_SELF_TEST_DESC_MD_SHA3)"

Digest tests used with the \*(L"KAT_Digest\*(R" type. Item "DSA (OSSL_SELF_TEST_DESC_SIGN_DSA)"

0 Item "RSA (OSSL_SELF_TEST_DESC_SIGN_RSA)" Item "ECDSA (OSSL_SELF_TEST_DESC_SIGN_ECDSA)"

Signature tests used with the \*(L"KAT_Signature\*(R" type. Item "ECDH (OSSL_SELF_TEST_DESC_KA_ECDH)"

0 Item "DH (OSSL_SELF_TEST_DESC_KA_DH)"

Key agreement tests used with the \*(L"\s-1KAT_KA\*(R"\s0 type. Item "HKDF (OSSL_SELF_TEST_DESC_KDF_HKDF)"

0 Item "TLS13_KDF_EXTRACT (OSSL_SELF_TEST_DESC_KDF_TLS13_EXTRACT)" Item "TLS13_KDF_EXPAND (OSSL_SELF_TEST_DESC_KDF_TLS13_EXPAND)" Item "SSKDF (OSSL_SELF_TEST_DESC_KDF_SSKDF)" Item "X963KDF (OSSL_SELF_TEST_DESC_KDF_X963KDF)" Item "X942KDF (OSSL_SELF_TEST_DESC_KDF_X942KDF)" Item "PBKDF2 (OSSL_SELF_TEST_DESC_KDF_PBKDF2)" Item "SSHKDF (OSSL_SELF_TEST_DESC_KDF_SSHKDF)" Item "TLS12_PRF (OSSL_SELF_TEST_DESC_KDF_TLS12_PRF)" Item "KBKDF (OSSL_SELF_TEST_DESC_KDF_KBKDF)"

Key Derivation Function tests used with the \*(L"\s-1KAT_KDF\*(R"\s0 type. Item "CTR (OSSL_SELF_TEST_DESC_DRBG_CTR)"

0 Item "HASH (OSSL_SELF_TEST_DESC_DRBG_HASH)" Item "HMAC (OSSL_SELF_TEST_DESC_DRBG_HMAC)"

\s-1DRBG\s0 tests used with the \*(L"\s-1DRBG\*(R"\s0 type. .Sp = item \*(L"\s-1RNG\*(R"\s0 (\s-1OSSL_SELF_TEST_DESC_RNG\s0) .Sp \*(L"Continuous_RNG_Test\*(R" uses this.

"EXAMPLES"
Header "EXAMPLES" A simple self test callback is shown below for illustrative purposes.

.Vb 1 #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\en", phase); \& /* Corrupt the SHA1 self test during the \*(Aqcorrupt\*(Aq 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; } .Ve

"NOTES"
Header "NOTES" Some released versions of OpenSSL do not include a validated \s-1FIPS\s0 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 \s-1FIPS\s0 provider using one of the validated versions listed there. Normally, it is possible to utilize a \s-1FIPS\s0 provider constructed from one of the validated versions alongside libcrypto and libssl compiled from any release within the same major release series. This flexibility enables you to address bug fixes and CVEs that fall outside the \s-1FIPS\s0 boundary.
"SEE ALSO"
Header "SEE ALSO" \fBopenssl-fipsinstall\|(1), \fBfips_config\|(5), \fBOSSL_SELF_TEST_set_callback\|(3), \fBOSSL_SELF_TEST_new\|(3), \s-1OSSL_PARAM\s0\|(3), \fBopenssl-core.h\|(7), \fBopenssl-core_dispatch.h\|(7), \fBprovider\|(7), <https://www.openssl.org/source/>
"HISTORY"
Header "HISTORY" This functionality was added in OpenSSL 3.0.
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.