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 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 7ossl"
way too many mistakes in technical documents.
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).
0
0
0
0
0
0
0
0
0
TEST-RAND is an unapproved algorithm.
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.
.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
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>.