openssl-fipsinstall.pod.in 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. =pod
  2. {- OpenSSL::safe::output_do_not_edit_headers(); -}
  3. =head1 NAME
  4. openssl-fipsinstall - perform FIPS configuration installation
  5. =head1 SYNOPSIS
  6. B<openssl fipsinstall>
  7. [B<-help>]
  8. [B<-in> I<configfilename>]
  9. [B<-out> I<configfilename>]
  10. [B<-module> I<modulefilename>]
  11. [B<-provider_name> I<providername>]
  12. [B<-section_name> I<sectionname>]
  13. [B<-verify>]
  14. [B<-mac_name> I<macname>]
  15. [B<-macopt> I<nm>:I<v>]
  16. [B<-noout>]
  17. [B<-quiet>]
  18. [B<-no_conditional_errors>]
  19. [B<-no_security_checks>]
  20. [B<-self_test_onload>]
  21. [B<-corrupt_desc> I<selftest_description>]
  22. [B<-corrupt_type> I<selftest_type>]
  23. [B<-config> I<parent_config>]
  24. =head1 DESCRIPTION
  25. This command is used to generate a FIPS module configuration file.
  26. This configuration file can be used each time a FIPS module is loaded
  27. in order to pass data to the FIPS module self tests. The FIPS module always
  28. verifies its MAC, but optionally only needs to run the KAT's once,
  29. at installation.
  30. The generated configuration file consists of:
  31. =over 4
  32. =item - A MAC of the FIPS module file.
  33. =item - A test status indicator.
  34. This indicates if the Known Answer Self Tests (KAT's) have successfully run.
  35. =item - A MAC of the status indicator.
  36. =item - A control for conditional self tests errors.
  37. By default if a continuous test (e.g a key pair test) fails then the FIPS module
  38. will enter an error state, and no services or cryptographic algorithms will be
  39. able to be accessed after this point.
  40. The default value of '1' will cause the fips module error state to be entered.
  41. If the value is '0' then the module error state will not be entered.
  42. Regardless of whether the error state is entered or not, the current operation
  43. (e.g. key generation) will return an error. The user is responsible for retrying
  44. the operation if the module error state is not entered.
  45. =item - A control to indicate whether run-time security checks are done.
  46. This indicates if run-time checks related to enforcement of security parameters
  47. such as minimum security strength of keys and approved curve names are used.
  48. The default value of '1' will perform the checks.
  49. If the value is '0' the checks are not performed and FIPS compliance must
  50. be done by procedures documented in the relevant Security Policy.
  51. =back
  52. This file is described in L<fips_config(5)>.
  53. =head1 OPTIONS
  54. =over 4
  55. =item B<-help>
  56. Print a usage message.
  57. =item B<-module> I<filename>
  58. Filename of the FIPS module to perform an integrity check on.
  59. The path provided in the filename is used to load the module when it is
  60. activated, and this overrides the environment variable B<OPENSSL_MODULES>.
  61. =item B<-out> I<configfilename>
  62. Filename to output the configuration data to; the default is standard output.
  63. =item B<-in> I<configfilename>
  64. Input filename to load configuration data from.
  65. Must be used if the B<-verify> option is specified.
  66. =item B<-verify>
  67. Verify that the input configuration file contains the correct information.
  68. =item B<-provider_name> I<providername>
  69. Name of the provider inside the configuration file.
  70. The default value is C<fips>.
  71. =item B<-section_name> I<sectionname>
  72. Name of the section inside the configuration file.
  73. The default value is C<fips_sect>.
  74. =item B<-mac_name> I<name>
  75. Specifies the name of a supported MAC algorithm which will be used.
  76. The MAC mechanisms that are available will depend on the options
  77. used when building OpenSSL.
  78. To see the list of supported MAC's use the command
  79. C<openssl list -mac-algorithms>. The default is B<HMAC>.
  80. =item B<-macopt> I<nm>:I<v>
  81. Passes options to the MAC algorithm.
  82. A comprehensive list of controls can be found in the EVP_MAC implementation
  83. documentation.
  84. Common control strings used for this command are:
  85. =over 4
  86. =item B<key>:I<string>
  87. Specifies the MAC key as an alphanumeric string (use if the key contains
  88. printable characters only).
  89. The string length must conform to any restrictions of the MAC algorithm.
  90. A key must be specified for every MAC algorithm.
  91. If no key is provided, the default that was specified when OpenSSL was
  92. configured is used.
  93. =item B<hexkey>:I<string>
  94. Specifies the MAC key in hexadecimal form (two hex digits per byte).
  95. The key length must conform to any restrictions of the MAC algorithm.
  96. A key must be specified for every MAC algorithm.
  97. If no key is provided, the default that was specified when OpenSSL was
  98. configured is used.
  99. =item B<digest>:I<string>
  100. Used by HMAC as an alphanumeric string (use if the key contains printable
  101. characters only).
  102. The string length must conform to any restrictions of the MAC algorithm.
  103. To see the list of supported digests, use the command
  104. C<openssl list -digest-commands>.
  105. The default digest is SHA-256.
  106. =back
  107. =item B<-noout>
  108. Disable logging of the self tests.
  109. =item B<-no_conditional_errors>
  110. Configure the module to not enter an error state if a conditional self test
  111. fails as described above.
  112. =item B<-no_security_checks>
  113. Configure the module to not perform run-time security checks as described above.
  114. =item B<-self_test_onload>
  115. Do not write the two fields related to the "test status indicator" and
  116. "MAC status indicator" to the output configuration file. Without these fields
  117. the self tests KATS will run each time the module is loaded. This option could be
  118. used for cross compiling, since the self tests need to run at least once on each
  119. target machine. Once the self tests have run on the target machine the user
  120. could possibly then add the 2 fields into the configuration using some other
  121. mechanism.
  122. =item B<-quiet>
  123. Do not output pass/fail messages. Implies B<-noout>.
  124. =item B<-corrupt_desc> I<selftest_description>,
  125. B<-corrupt_type> I<selftest_type>
  126. The corrupt options can be used to test failure of one or more self tests by
  127. name.
  128. Either option or both may be used to select the tests to corrupt.
  129. Refer to the entries for B<st-desc> and B<st-type> in L<OSSL_PROVIDER-FIPS(7)> for
  130. values that can be used.
  131. =item B<-config> I<parent_config>
  132. Test that a FIPS provider can be loaded from the specified configuration file.
  133. A previous call to this application needs to generate the extra configuration
  134. data that is included by the base C<parent_config> configuration file.
  135. See L<config(5)> for further information on how to set up a provider section.
  136. All other options are ignored if '-config' is used.
  137. =back
  138. =head1 EXAMPLES
  139. Calculate the mac of a FIPS module F<fips.so> and run a FIPS self test
  140. for the module, and save the F<fips.cnf> configuration file:
  141. openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips
  142. Verify that the configuration file F<fips.cnf> contains the correct info:
  143. openssl fipsinstall -module ./fips.so -in fips.cnf -provider_name fips -verify
  144. Corrupt any self tests which have the description C<SHA1>:
  145. openssl fipsinstall -module ./fips.so -out fips.cnf -provider_name fips \
  146. -corrupt_desc 'SHA1'
  147. Validate that the fips module can be loaded from a base configuration file:
  148. export OPENSSL_CONF_INCLUDE=<path of configuration files>
  149. export OPENSSL_MODULES=<provider-path>
  150. openssl fipsinstall -config' 'default.cnf'
  151. =head1 SEE ALSO
  152. L<config(5)>,
  153. L<fips_config(5)>,
  154. L<OSSL_PROVIDER-FIPS(7)>,
  155. L<EVP_MAC(3)>
  156. =head1 COPYRIGHT
  157. Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
  158. Licensed under the Apache License 2.0 (the "License"). You may not use
  159. this file except in compliance with the License. You can obtain a copy
  160. in the file LICENSE in the source distribution or at
  161. L<https://www.openssl.org/source/license.html>.
  162. =cut