404 lines
17 KiB
Groff
Executable File
404 lines
17 KiB
Groff
Executable File
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ========================================================================
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Vb \" Begin verbatim text
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve \" End verbatim text
|
|
.ft R
|
|
.fi
|
|
..
|
|
.\" 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 C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
.ie n \{\
|
|
. 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\}
|
|
.el\{\
|
|
. ds -- \|\(em\|
|
|
. ds PI \(*p
|
|
. ds L" ``
|
|
. ds R" ''
|
|
'br\}
|
|
.\"
|
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
|
.ie \n(.g .ds Aq \(aq
|
|
.el .ds Aq '
|
|
.\"
|
|
.\" If the F register is turned on, 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.
|
|
.ie \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
. nr % 0
|
|
. rr F
|
|
.\}
|
|
.el \{\
|
|
. de IX
|
|
..
|
|
.\}
|
|
.\"
|
|
.\" 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
|
|
.if n \{\
|
|
. ds #H 0
|
|
. ds #V .8m
|
|
. ds #F .3m
|
|
. ds #[ \f1
|
|
. ds #] \fP
|
|
.\}
|
|
.if t \{\
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
. ds #V .6m
|
|
. ds #F 0
|
|
. ds #[ \&
|
|
. ds #] \&
|
|
.\}
|
|
. \" simple accents for nroff and troff
|
|
.if n \{\
|
|
. ds ' \&
|
|
. ds ` \&
|
|
. ds ^ \&
|
|
. ds , \&
|
|
. ds ~ ~
|
|
. ds /
|
|
.\}
|
|
.if t \{\
|
|
. 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
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
. \" corrections for vroff
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
. \" for low resolution devices (crt and lpr)
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
\{\
|
|
. 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
|
|
.\}
|
|
.rm #[ #] #H #V #F C
|
|
.\" ========================================================================
|
|
.\"
|
|
.IX Title "OSSL_PROVIDER-FIPS 7"
|
|
.TH OSSL_PROVIDER-FIPS 7 "2020-03-02" "3.0.0-dev" "OpenSSL"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
|
.\" way too many mistakes in technical documents.
|
|
.if n .ad l
|
|
.nh
|
|
.SH "NAME"
|
|
OSSL_PROVIDER\-FIPS \- OPENSSL FIPS provider
|
|
.SH "DESCRIPTION"
|
|
.IX Header "DESCRIPTION"
|
|
The \s-1OPENSSL\s0 \s-1FIPS\s0 provider is a special provider that conforms to the Federal
|
|
Information Processing Standards (\s-1FIPS\s0) specified in \s-1FIPS\s0 140\-2. This 'module'
|
|
contains an approved set of cryptographic algorithms that is validated by an
|
|
accredited testing laboratory.
|
|
.SH "SELF TESTING"
|
|
.IX 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
|
|
\&\fIOSSL_SELF_TEST_set_callback\fR\|(3).
|
|
.PP
|
|
The \s-1OPENSSL\s0 \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.
|
|
.PP
|
|
The 'args' parameter of \fB\s-1OSSL_CALLBACK\s0\fR contains the \fB\s-1OPENSSL_CTX\s0\fR associated
|
|
with the provider that is triggering the self test. This may be useful if
|
|
multiple fips providers are present.
|
|
.PP
|
|
The \s-1OSSL_PARAM\s0 names used are:
|
|
.ie n .IP """st-phase"" (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_PHASE\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.el .IP "``st-phase'' (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_PHASE\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.IX Item "st-phase (OSSL_PROV_PARAM_SELF_TEST_PHASE) <UTF8 string>"
|
|
Each self test calls the callback 3 times with the following string values
|
|
for the phase.
|
|
.RS 4
|
|
.ie n .IP """Start"" (\fB\s-1OSSL_SELF_TEST_PHASE_START\s0\fR)" 4
|
|
.el .IP "``Start'' (\fB\s-1OSSL_SELF_TEST_PHASE_START\s0\fR)" 4
|
|
.IX Item "Start (OSSL_SELF_TEST_PHASE_START)"
|
|
This is the initial phase before the self test has run.
|
|
This is used for informational purposes only.
|
|
The value returned by the callback is ignored.
|
|
.ie n .IP """Corrupt"" (\fB\s-1OSSL_SELF_TEST_PHASE_CORRUPT\s0\fR)" 4
|
|
.el .IP "``Corrupt'' (\fB\s-1OSSL_SELF_TEST_PHASE_CORRUPT\s0\fR)" 4
|
|
.IX Item "Corrupt (OSSL_SELF_TEST_PHASE_CORRUPT)"
|
|
The corrupt phase is run after the self test has calculated its known value.
|
|
The callback may be used to force the self test to fail by returning a value
|
|
of 0 from the callback during this phase.
|
|
Returning any other value from the callback causes the self test to run normally.
|
|
.ie n .IP """Pass"" (\fB\s-1OSSL_SELF_TEST_PHASE_PASS\s0\fR)" 4
|
|
.el .IP "``Pass'' (\fB\s-1OSSL_SELF_TEST_PHASE_PASS\s0\fR)" 4
|
|
.IX Item "Pass (OSSL_SELF_TEST_PHASE_PASS)"
|
|
.PD 0
|
|
.ie n .IP """Fail"" (\fB\s-1OSSL_SELF_TEST_PHASE_FAIL\s0\fR)" 4
|
|
.el .IP "``Fail'' (\fB\s-1OSSL_SELF_TEST_PHASE_FAIL\s0\fR)" 4
|
|
.IX Item "Fail (OSSL_SELF_TEST_PHASE_FAIL)"
|
|
.PD
|
|
The final phase runs after the self test is complete and indicates if a self
|
|
test passed or failed. This is used for informational purposes only.
|
|
The value returned by the callback is ignored.
|
|
\&\*(L"Fail\*(R" should normally only be returned if any self test was forced to fail
|
|
during the \*(L"Corrupt\*(R" phase (or if there was an error such as the integrity
|
|
check of the module failed).
|
|
.Sp
|
|
Note that all self tests run even if a self test failure occurs.
|
|
.RE
|
|
.RS 4
|
|
.RE
|
|
.ie n .IP """st-type"" (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_TYPE\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.el .IP "``st-type'' (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_TYPE\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.IX Item "st-type (OSSL_PROV_PARAM_SELF_TEST_TYPE) <UTF8 string>"
|
|
Used as a category to identify the type of self test being run.
|
|
It includes the following string values:
|
|
.RS 4
|
|
.ie n .IP """Module_Integrity"" (\fB\s-1OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY\s0\fR)" 4
|
|
.el .IP "``Module_Integrity'' (\fB\s-1OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY\s0\fR)" 4
|
|
.IX Item "Module_Integrity (OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY)"
|
|
Uses \s-1HMAC\s0 \s-1SHA256\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.
|
|
.ie n .IP """Install_Integrity"" (\fB\s-1OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY\s0\fR)" 4
|
|
.el .IP "``Install_Integrity'' (\fB\s-1OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY\s0\fR)" 4
|
|
.IX Item "Install_Integrity (OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY)"
|
|
Uses \s-1HMAC\s0 \s-1SHA256\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.
|
|
.ie n .IP """KAT_Cipher"" (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_CIPHER\s0\fR)" 4
|
|
.el .IP "``KAT_Cipher'' (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_CIPHER\s0\fR)" 4
|
|
.IX Item "KAT_Cipher (OSSL_SELF_TEST_TYPE_KAT_CIPHER)"
|
|
Known answer test for a symmetric cipher.
|
|
.ie n .IP """KAT_Digest"" (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_DIGEST\s0\fR)" 4
|
|
.el .IP "``KAT_Digest'' (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_DIGEST\s0\fR)" 4
|
|
.IX Item "KAT_Digest (OSSL_SELF_TEST_TYPE_KAT_DIGEST)"
|
|
Known answer test for a digest.
|
|
.ie n .IP """KAT_Signature"" (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_SIGNATURE\s0\fR)" 4
|
|
.el .IP "``KAT_Signature'' (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_SIGNATURE\s0\fR)" 4
|
|
.IX Item "KAT_Signature (OSSL_SELF_TEST_TYPE_KAT_SIGNATURE)"
|
|
Known answer test for a signature.
|
|
.ie n .IP """\s-1KAT_KDF\s0"" (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_KDF\s0\fR)" 4
|
|
.el .IP "``\s-1KAT_KDF\s0'' (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_KDF\s0\fR)" 4
|
|
.IX Item "KAT_KDF (OSSL_SELF_TEST_TYPE_KAT_KDF)"
|
|
Known answer test for a key derivation function.
|
|
.ie n .IP """\s-1KAT_KA\s0"" (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_KA\s0\fR)" 4
|
|
.el .IP "``\s-1KAT_KA\s0'' (\fB\s-1OSSL_SELF_TEST_TYPE_KAT_KA\s0\fR)" 4
|
|
.IX Item "KAT_KA (OSSL_SELF_TEST_TYPE_KAT_KA)"
|
|
Known answer test for key agreement.
|
|
.ie n .IP """\s-1DRBG\s0"" (\fB\s-1OSSL_SELF_TEST_TYPE_DRBG\s0\fR)" 4
|
|
.el .IP "``\s-1DRBG\s0'' (\fB\s-1OSSL_SELF_TEST_TYPE_DRBG\s0\fR)" 4
|
|
.IX Item "DRBG (OSSL_SELF_TEST_TYPE_DRBG)"
|
|
Known answer test for a Deterministic Random Bit Generator.
|
|
.ie n .IP """Pairwise_Consistency_Test"" (\fB\s-1OSSL_SELF_TEST_TYPE_PCT\s0\fR)" 4
|
|
.el .IP "``Pairwise_Consistency_Test'' (\fB\s-1OSSL_SELF_TEST_TYPE_PCT\s0\fR)" 4
|
|
.IX Item "Pairwise_Consistency_Test (OSSL_SELF_TEST_TYPE_PCT)"
|
|
Conditional test that is run during the generation of key pairs.
|
|
.RE
|
|
.RS 4
|
|
.Sp
|
|
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".
|
|
.Sp
|
|
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.
|
|
.RE
|
|
.ie n .IP """st-desc"" (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_DESC\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.el .IP "``st-desc'' (\fB\s-1OSSL_PROV_PARAM_SELF_TEST_DESC\s0\fR) <\s-1UTF8\s0 string>" 4
|
|
.IX Item "st-desc (OSSL_PROV_PARAM_SELF_TEST_DESC) <UTF8 string>"
|
|
Used as a sub category to identify an individual self test.
|
|
The following description strings are used.
|
|
.RS 4
|
|
.ie n .IP """\s-1HMAC\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_INTEGRITY_HMAC\s0\fR)" 4
|
|
.el .IP "``\s-1HMAC\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_INTEGRITY_HMAC\s0\fR)" 4
|
|
.IX Item "HMAC (OSSL_SELF_TEST_DESC_INTEGRITY_HMAC)"
|
|
\&\*(L"Module_Integrity\*(R" and \*(L"Install_Integrity\*(R" use this.
|
|
.ie n .IP """\s-1RSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1\s0\fR)" 4
|
|
.el .IP "``\s-1RSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1\s0\fR)" 4
|
|
.IX Item "RSA (OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1)"
|
|
.PD 0
|
|
.ie n .IP """\s-1ECDSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_PCT_ECDSA\s0\fR)" 4
|
|
.el .IP "``\s-1ECDSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_PCT_ECDSA\s0\fR)" 4
|
|
.IX Item "ECDSA (OSSL_SELF_TEST_DESC_PCT_ECDSA)"
|
|
.ie n .IP """\s-1DSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_PCT_DSA\s0\fR)" 4
|
|
.el .IP "``\s-1DSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_PCT_DSA\s0\fR)" 4
|
|
.IX Item "DSA (OSSL_SELF_TEST_DESC_PCT_DSA)"
|
|
.PD
|
|
Key generation tests used with the \*(L"Pairwise_Consistency_Test\*(R" type.
|
|
.ie n .IP """\s-1AES_GCM\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_CIPHER_AES_GCM\s0\fR)" 4
|
|
.el .IP "``\s-1AES_GCM\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_CIPHER_AES_GCM\s0\fR)" 4
|
|
.IX Item "AES_GCM (OSSL_SELF_TEST_DESC_CIPHER_AES_GCM)"
|
|
.PD 0
|
|
.ie n .IP """\s-1TDES\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_CIPHER_TDES\s0\fR)" 4
|
|
.el .IP "``\s-1TDES\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_CIPHER_TDES\s0\fR)" 4
|
|
.IX Item "TDES (OSSL_SELF_TEST_DESC_CIPHER_TDES)"
|
|
.PD
|
|
Symmetric cipher tests used with the \*(L"KAT_Cipher\*(R" type.
|
|
.ie n .IP """\s-1SHA1\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA1\s0\fR)" 4
|
|
.el .IP "``\s-1SHA1\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA1\s0\fR)" 4
|
|
.IX Item "SHA1 (OSSL_SELF_TEST_DESC_MD_SHA1)"
|
|
.PD 0
|
|
.ie n .IP """\s-1SHA2\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA2\s0\fR)" 4
|
|
.el .IP "``\s-1SHA2\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA2\s0\fR)" 4
|
|
.IX Item "SHA2 (OSSL_SELF_TEST_DESC_MD_SHA2)"
|
|
.ie n .IP """\s-1SHA3\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA3\s0\fR)" 4
|
|
.el .IP "``\s-1SHA3\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_MD_SHA3\s0\fR)" 4
|
|
.IX Item "SHA3 (OSSL_SELF_TEST_DESC_MD_SHA3)"
|
|
.PD
|
|
Digest tests used with the \*(L"KAT_Digest\*(R" type.
|
|
.ie n .IP """\s-1DSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_DSA\s0\fR)" 4
|
|
.el .IP "``\s-1DSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_DSA\s0\fR)" 4
|
|
.IX Item "DSA (OSSL_SELF_TEST_DESC_SIGN_DSA)"
|
|
.PD 0
|
|
.ie n .IP """\s-1RSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_RSA\s0\fR)" 4
|
|
.el .IP "``\s-1RSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_RSA\s0\fR)" 4
|
|
.IX Item "RSA (OSSL_SELF_TEST_DESC_SIGN_RSA)"
|
|
.ie n .IP """\s-1ECDSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_ECDSA\s0\fR)" 4
|
|
.el .IP "``\s-1ECDSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_SIGN_ECDSA\s0\fR)" 4
|
|
.IX Item "ECDSA (OSSL_SELF_TEST_DESC_SIGN_ECDSA)"
|
|
.PD
|
|
Signature tests used with the \*(L"KAT_Signature\*(R" type.
|
|
.ie n .IP """\s-1ECDH\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_KA_ECDH\s0\fR)" 4
|
|
.el .IP "``\s-1ECDH\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_KA_ECDH\s0\fR)" 4
|
|
.IX Item "ECDH (OSSL_SELF_TEST_DESC_KA_ECDH)"
|
|
.PD 0
|
|
.ie n .IP """\s-1ECDSA\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_KA_ECDSA\s0\fR)" 4
|
|
.el .IP "``\s-1ECDSA\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_KA_ECDSA\s0\fR)" 4
|
|
.IX Item "ECDSA (OSSL_SELF_TEST_DESC_KA_ECDSA)"
|
|
.PD
|
|
Key agreement tests used with the \*(L"\s-1KAT_KA\s0\*(R" type.
|
|
.ie n .IP """\s-1HKDF\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_KDF_HKDF\s0\fR)" 4
|
|
.el .IP "``\s-1HKDF\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_KDF_HKDF\s0\fR)" 4
|
|
.IX Item "HKDF (OSSL_SELF_TEST_DESC_KDF_HKDF)"
|
|
Key Derivation Function tests used with the \*(L"\s-1KAT_KDF\s0\*(R" type.
|
|
.ie n .IP """\s-1CTR\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_CTR\s0\fR)" 4
|
|
.el .IP "``\s-1CTR\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_CTR\s0\fR)" 4
|
|
.IX Item "CTR (OSSL_SELF_TEST_DESC_DRBG_CTR)"
|
|
.PD 0
|
|
.ie n .IP """\s-1HASH\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_HASH\s0\fR)" 4
|
|
.el .IP "``\s-1HASH\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_HASH\s0\fR)" 4
|
|
.IX Item "HASH (OSSL_SELF_TEST_DESC_DRBG_HASH)"
|
|
.ie n .IP """\s-1HMAC\s0"" (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_HMAC\s0\fR)" 4
|
|
.el .IP "``\s-1HMAC\s0'' (\fB\s-1OSSL_SELF_TEST_DESC_DRBG_HMAC\s0\fR)" 4
|
|
.IX Item "HMAC (OSSL_SELF_TEST_DESC_DRBG_HMAC)"
|
|
.PD
|
|
\&\s-1DRBG\s0 tests used with the \*(L"\s-1DRBG\s0\*(R" type.
|
|
.RE
|
|
.RS 4
|
|
.RE
|
|
.SH "EXAMPLES"
|
|
.IX Header "EXAMPLES"
|
|
A simple self test callback is shown below for illustrative purposes.
|
|
.PP
|
|
.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
|
|
.SH "SEE ALSO"
|
|
.IX Header "SEE ALSO"
|
|
\&\fIopenssl\-fipsinstall\fR\|(1),
|
|
\&\fIfips_config\fR\|(5),
|
|
\&\fIOSSL_SELF_TEST_set_callback\fR\|(3),
|
|
\&\s-1\fIOSSL_PARAM\s0\fR\|(3),
|
|
\&\fIopenssl\-core.h\fR\|(7)
|
|
.SH "HISTORY"
|
|
.IX Header "HISTORY"
|
|
The type and functions described here were added in OpenSSL 3.0.
|
|
.SH "COPYRIGHT"
|
|
.IX Header "COPYRIGHT"
|
|
Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
|
.PP
|
|
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>.
|