openssl-fipsinstall.1ossl 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "OPENSSL-FIPSINSTALL 1ossl"
  136. .TH OPENSSL-FIPSINSTALL 1ossl "2025-06-29" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. openssl\-fipsinstall \- perform FIPS configuration installation
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. \&\fBopenssl fipsinstall\fR
  146. [\fB\-help\fR]
  147. [\fB\-in\fR \fIconfigfilename\fR]
  148. [\fB\-out\fR \fIconfigfilename\fR]
  149. [\fB\-module\fR \fImodulefilename\fR]
  150. [\fB\-provider_name\fR \fIprovidername\fR]
  151. [\fB\-section_name\fR \fIsectionname\fR]
  152. [\fB\-verify\fR]
  153. [\fB\-mac_name\fR \fImacname\fR]
  154. [\fB\-macopt\fR \fInm\fR:\fIv\fR]
  155. [\fB\-noout\fR]
  156. [\fB\-quiet\fR]
  157. [\fB\-pedantic\fR]
  158. [\fB\-no_conditional_errors\fR]
  159. [\fB\-no_security_checks\fR]
  160. [\fB\-ems_check\fR]
  161. [\fB\-no_drbg_truncated_digests\fR]
  162. [\fB\-self_test_onload\fR]
  163. [\fB\-self_test_oninstall\fR]
  164. [\fB\-corrupt_desc\fR \fIselftest_description\fR]
  165. [\fB\-corrupt_type\fR \fIselftest_type\fR]
  166. [\fB\-config\fR \fIparent_config\fR]
  167. .SH "DESCRIPTION"
  168. .IX Header "DESCRIPTION"
  169. This command is used to generate a \s-1FIPS\s0 module configuration file.
  170. This configuration file can be used each time a \s-1FIPS\s0 module is loaded
  171. in order to pass data to the \s-1FIPS\s0 module self tests. The \s-1FIPS\s0 module always
  172. verifies its \s-1MAC,\s0 but optionally only needs to run the \s-1KAT\s0's once,
  173. at installation.
  174. .PP
  175. The generated configuration file consists of:
  176. .IP "\- A \s-1MAC\s0 of the \s-1FIPS\s0 module file." 4
  177. .IX Item "- A MAC of the FIPS module file."
  178. .PD 0
  179. .IP "\- A test status indicator." 4
  180. .IX Item "- A test status indicator."
  181. .PD
  182. This indicates if the Known Answer Self Tests (\s-1KAT\s0's) have successfully run.
  183. .IP "\- A \s-1MAC\s0 of the status indicator." 4
  184. .IX Item "- A MAC of the status indicator."
  185. .PD 0
  186. .IP "\- A control for conditional self tests errors." 4
  187. .IX Item "- A control for conditional self tests errors."
  188. .PD
  189. By default if a continuous test (e.g a key pair test) fails then the \s-1FIPS\s0 module
  190. will enter an error state, and no services or cryptographic algorithms will be
  191. able to be accessed after this point.
  192. The default value of '1' will cause the fips module error state to be entered.
  193. If the value is '0' then the module error state will not be entered.
  194. Regardless of whether the error state is entered or not, the current operation
  195. (e.g. key generation) will return an error. The user is responsible for retrying
  196. the operation if the module error state is not entered.
  197. .IP "\- A control to indicate whether run-time security checks are done." 4
  198. .IX Item "- A control to indicate whether run-time security checks are done."
  199. This indicates if run-time checks related to enforcement of security parameters
  200. such as minimum security strength of keys and approved curve names are used.
  201. The default value of '1' will perform the checks.
  202. If the value is '0' the checks are not performed and \s-1FIPS\s0 compliance must
  203. be done by procedures documented in the relevant Security Policy.
  204. .PP
  205. This file is described in \fBfips_config\fR\|(5).
  206. .SH "OPTIONS"
  207. .IX Header "OPTIONS"
  208. .IP "\fB\-help\fR" 4
  209. .IX Item "-help"
  210. Print a usage message.
  211. .IP "\fB\-module\fR \fIfilename\fR" 4
  212. .IX Item "-module filename"
  213. Filename of the \s-1FIPS\s0 module to perform an integrity check on.
  214. The path provided in the filename is used to load the module when it is
  215. activated, and this overrides the environment variable \fB\s-1OPENSSL_MODULES\s0\fR.
  216. .IP "\fB\-out\fR \fIconfigfilename\fR" 4
  217. .IX Item "-out configfilename"
  218. Filename to output the configuration data to; the default is standard output.
  219. .IP "\fB\-in\fR \fIconfigfilename\fR" 4
  220. .IX Item "-in configfilename"
  221. Input filename to load configuration data from.
  222. Must be used if the \fB\-verify\fR option is specified.
  223. .IP "\fB\-verify\fR" 4
  224. .IX Item "-verify"
  225. Verify that the input configuration file contains the correct information.
  226. .IP "\fB\-provider_name\fR \fIprovidername\fR" 4
  227. .IX Item "-provider_name providername"
  228. Name of the provider inside the configuration file.
  229. The default value is \f(CW\*(C`fips\*(C'\fR.
  230. .IP "\fB\-section_name\fR \fIsectionname\fR" 4
  231. .IX Item "-section_name sectionname"
  232. Name of the section inside the configuration file.
  233. The default value is \f(CW\*(C`fips_sect\*(C'\fR.
  234. .IP "\fB\-mac_name\fR \fIname\fR" 4
  235. .IX Item "-mac_name name"
  236. Specifies the name of a supported \s-1MAC\s0 algorithm which will be used.
  237. The \s-1MAC\s0 mechanisms that are available will depend on the options
  238. used when building OpenSSL.
  239. To see the list of supported \s-1MAC\s0's use the command
  240. \&\f(CW\*(C`openssl list \-mac\-algorithms\*(C'\fR. The default is \fB\s-1HMAC\s0\fR.
  241. .IP "\fB\-macopt\fR \fInm\fR:\fIv\fR" 4
  242. .IX Item "-macopt nm:v"
  243. Passes options to the \s-1MAC\s0 algorithm.
  244. A comprehensive list of controls can be found in the \s-1EVP_MAC\s0 implementation
  245. documentation.
  246. Common control strings used for this command are:
  247. .RS 4
  248. .IP "\fBkey\fR:\fIstring\fR" 4
  249. .IX Item "key:string"
  250. Specifies the \s-1MAC\s0 key as an alphanumeric string (use if the key contains
  251. printable characters only).
  252. The string length must conform to any restrictions of the \s-1MAC\s0 algorithm.
  253. A key must be specified for every \s-1MAC\s0 algorithm.
  254. If no key is provided, the default that was specified when OpenSSL was
  255. configured is used.
  256. .IP "\fBhexkey\fR:\fIstring\fR" 4
  257. .IX Item "hexkey:string"
  258. Specifies the \s-1MAC\s0 key in hexadecimal form (two hex digits per byte).
  259. The key length must conform to any restrictions of the \s-1MAC\s0 algorithm.
  260. A key must be specified for every \s-1MAC\s0 algorithm.
  261. If no key is provided, the default that was specified when OpenSSL was
  262. configured is used.
  263. .IP "\fBdigest\fR:\fIstring\fR" 4
  264. .IX Item "digest:string"
  265. Used by \s-1HMAC\s0 as an alphanumeric string (use if the key contains printable
  266. characters only).
  267. The string length must conform to any restrictions of the \s-1MAC\s0 algorithm.
  268. To see the list of supported digests, use the command
  269. \&\f(CW\*(C`openssl list \-digest\-commands\*(C'\fR.
  270. The default digest is \s-1SHA\-256.\s0
  271. .RE
  272. .RS 4
  273. .RE
  274. .IP "\fB\-noout\fR" 4
  275. .IX Item "-noout"
  276. Disable logging of the self tests.
  277. .IP "\fB\-pedantic\fR" 4
  278. .IX Item "-pedantic"
  279. Configure the module so that it is strictly \s-1FIPS\s0 compliant rather
  280. than being backwards compatible. This enables conditional errors,
  281. security checks etc. Note that any previous configuration options will
  282. be overwritten and any subsequent configuration options that violate
  283. \&\s-1FIPS\s0 compliance will result in an error.
  284. .IP "\fB\-no_conditional_errors\fR" 4
  285. .IX Item "-no_conditional_errors"
  286. Configure the module to not enter an error state if a conditional self test
  287. fails as described above.
  288. .IP "\fB\-no_security_checks\fR" 4
  289. .IX Item "-no_security_checks"
  290. Configure the module to not perform run-time security checks as described above.
  291. .Sp
  292. Enabling the configuration option \*(L"no-fips-securitychecks\*(R" provides another way to
  293. turn off the check at compile time.
  294. .IP "\fB\-ems_check\fR" 4
  295. .IX Item "-ems_check"
  296. Configure the module to enable a run-time Extended Master Secret (\s-1EMS\s0) check
  297. when using the \s-1TLS1_PRF KDF\s0 algorithm. This check is disabled by default.
  298. See \s-1RFC 7627\s0 for information related to \s-1EMS.\s0
  299. .IP "\fB\-no_drbg_truncated_digests\fR" 4
  300. .IX Item "-no_drbg_truncated_digests"
  301. Configure the module to not allow truncated digests to be used with Hash and
  302. \&\s-1HMAC\s0 DRBGs. See \s-1FIPS 140\-3 IG D.R\s0 for details.
  303. .IP "\fB\-self_test_onload\fR" 4
  304. .IX Item "-self_test_onload"
  305. Do not write the two fields related to the \*(L"test status indicator\*(R" and
  306. \&\*(L"\s-1MAC\s0 status indicator\*(R" to the output configuration file. Without these fields
  307. the self tests \s-1KATS\s0 will run each time the module is loaded. This option could be
  308. used for cross compiling, since the self tests need to run at least once on each
  309. target machine. Once the self tests have run on the target machine the user
  310. could possibly then add the 2 fields into the configuration using some other
  311. mechanism.
  312. .Sp
  313. This is the default.
  314. .IP "\fB\-self_test_oninstall\fR" 4
  315. .IX Item "-self_test_oninstall"
  316. The converse of \fB\-self_test_oninstall\fR. The two fields related to the
  317. \&\*(L"test status indicator\*(R" and \*(L"\s-1MAC\s0 status indicator\*(R" are written to the
  318. output configuration file.
  319. .IP "\fB\-quiet\fR" 4
  320. .IX Item "-quiet"
  321. Do not output pass/fail messages. Implies \fB\-noout\fR.
  322. .IP "\fB\-corrupt_desc\fR \fIselftest_description\fR, \fB\-corrupt_type\fR \fIselftest_type\fR" 4
  323. .IX Item "-corrupt_desc selftest_description, -corrupt_type selftest_type"
  324. The corrupt options can be used to test failure of one or more self tests by
  325. name.
  326. Either option or both may be used to select the tests to corrupt.
  327. Refer to the entries for \fBst-desc\fR and \fBst-type\fR in \s-1\fBOSSL_PROVIDER\-FIPS\s0\fR\|(7) for
  328. values that can be used.
  329. .IP "\fB\-config\fR \fIparent_config\fR" 4
  330. .IX Item "-config parent_config"
  331. Test that a \s-1FIPS\s0 provider can be loaded from the specified configuration file.
  332. A previous call to this application needs to generate the extra configuration
  333. data that is included by the base \f(CW\*(C`parent_config\*(C'\fR configuration file.
  334. See \fBconfig\fR\|(5) for further information on how to set up a provider section.
  335. All other options are ignored if '\-config' is used.
  336. .SH "NOTES"
  337. .IX Header "NOTES"
  338. Self tests results are logged by default if the options \fB\-quiet\fR and \fB\-noout\fR
  339. are not specified, or if either of the options \fB\-corrupt_desc\fR or
  340. \&\fB\-corrupt_type\fR are used.
  341. If the base configuration file is set up to autoload the fips module, then the
  342. fips module will be loaded and self tested \s-1BEFORE\s0 the fipsinstall application
  343. has a chance to set up its own self test callback. As a result of this the self
  344. test output and the options \fB\-corrupt_desc\fR and \fB\-corrupt_type\fR will be ignored.
  345. For normal usage the base configuration file should use the default provider
  346. when generating the fips configuration file.
  347. .PP
  348. The \fB\-self_test_oninstall\fR option was added and the
  349. \&\fB\-self_test_onload\fR option was made the default in OpenSSL 3.1.
  350. .PP
  351. The command and all remaining options were added in OpenSSL 3.0.
  352. .SH "EXAMPLES"
  353. .IX Header "EXAMPLES"
  354. Calculate the mac of a \s-1FIPS\s0 module \fIfips.so\fR and run a \s-1FIPS\s0 self test
  355. for the module, and save the \fIfips.cnf\fR configuration file:
  356. .PP
  357. .Vb 1
  358. \& openssl fipsinstall \-module ./fips.so \-out fips.cnf \-provider_name fips
  359. .Ve
  360. .PP
  361. Verify that the configuration file \fIfips.cnf\fR contains the correct info:
  362. .PP
  363. .Vb 1
  364. \& openssl fipsinstall \-module ./fips.so \-in fips.cnf \-provider_name fips \-verify
  365. .Ve
  366. .PP
  367. Corrupt any self tests which have the description \f(CW\*(C`SHA1\*(C'\fR:
  368. .PP
  369. .Vb 2
  370. \& openssl fipsinstall \-module ./fips.so \-out fips.cnf \-provider_name fips \e
  371. \& \-corrupt_desc \*(AqSHA1\*(Aq
  372. .Ve
  373. .PP
  374. Validate that the fips module can be loaded from a base configuration file:
  375. .PP
  376. .Vb 3
  377. \& export OPENSSL_CONF_INCLUDE=<path of configuration files>
  378. \& export OPENSSL_MODULES=<provider\-path>
  379. \& openssl fipsinstall \-config\*(Aq \*(Aqdefault.cnf\*(Aq
  380. .Ve
  381. .SH "SEE ALSO"
  382. .IX Header "SEE ALSO"
  383. \&\fBconfig\fR\|(5),
  384. \&\fBfips_config\fR\|(5),
  385. \&\s-1\fBOSSL_PROVIDER\-FIPS\s0\fR\|(7),
  386. \&\s-1\fBEVP_MAC\s0\fR\|(3)
  387. .SH "COPYRIGHT"
  388. .IX Header "COPYRIGHT"
  389. Copyright 2019\-2023 The OpenSSL Project Authors. All Rights Reserved.
  390. .PP
  391. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  392. this file except in compliance with the License. You can obtain a copy
  393. in the file \s-1LICENSE\s0 in the source distribution or at
  394. <https://www.openssl.org/source/license.html>.