|
|
c4366c |
User guide for the FIPS Red Hat Enterprise Linux - OpenSSL Module
|
|
|
c4366c |
=================================================================
|
|
|
c4366c |
|
|
|
c4366c |
This package contains libraries which comprise the FIPS 140-2
|
|
|
c4366c |
Red Hat Enterprise Linux - OPENSSL Module.
|
|
|
c4366c |
|
|
|
c4366c |
The module files
|
|
|
c4366c |
================
|
|
|
c4366c |
/lib[64]/libcrypto.so.0.9.8e
|
|
|
c4366c |
/lib[64]/libssl.so.0.9.8e
|
|
|
c4366c |
/lib[64]/.libcrypto.so.0.9.8e.hmac
|
|
|
c4366c |
/lib[64]/.libssl.so.0.9.8e.hmac
|
|
|
c4366c |
|
|
|
c4366c |
Dependencies
|
|
|
c4366c |
============
|
|
|
c4366c |
|
|
|
c4366c |
The approved mode of operation requires kernel with /dev/urandom RNG running
|
|
|
c4366c |
with properties as defined in the security policy of the module. This is
|
|
|
c4366c |
provided by kernel packages with validated Red Hat Enterprise Linux - IPSec
|
|
|
c4366c |
Crytographic Module.
|
|
|
c4366c |
|
|
|
c4366c |
Installation
|
|
|
c4366c |
============
|
|
|
c4366c |
|
|
|
c4366c |
The RPM package of the module can be installed by standard tools recommended
|
|
|
c4366c |
for installation of RPM packages on the Red Hat Enterprise Linux system (yum,
|
|
|
c4366c |
rpm, RHN remote management tool).
|
|
|
c4366c |
|
|
|
c4366c |
For proper operation of the in-module integrity verification the prelink has to
|
|
|
c4366c |
be disabled. This can be done with setting PRELINKING=no in the
|
|
|
c4366c |
/etc/sysconfig/prelink configuration file. If the libraries were already
|
|
|
c4366c |
prelinked the prelink should be undone on all the system files with the
|
|
|
c4366c |
'prelink -u -a' command.
|
|
|
c4366c |
|
|
|
c4366c |
Usage and API
|
|
|
c4366c |
=============
|
|
|
c4366c |
|
|
|
c4366c |
The module respects kernel command line FIPS setting. If the kernel command
|
|
|
c4366c |
line contains option fips=1 the module will initialize in the FIPS approved
|
|
|
c4366c |
mode of operation automatically. To allow for the automatic initialization the
|
|
|
c4366c |
application using the module has to call one of the following API calls:
|
|
|
c4366c |
|
|
|
c4366c |
- void OPENSSL_init(void) - this will do only a basic initialization of the
|
|
|
c4366c |
library and does initialization of the FIPS approved mode without setting up
|
|
|
c4366c |
EVP API with supported algorithms.
|
|
|
c4366c |
|
|
|
c4366c |
- void OPENSSL_add_all_algorithms(void) - this API function calls
|
|
|
c4366c |
OPENSSL_init() implicitly and also adds all approved algorithms to the EVP API
|
|
|
c4366c |
in the approved mode
|
|
|
c4366c |
|
|
|
c4366c |
- void SSL_library_init(void) - it calls OPENSSL_init() implicitly and also
|
|
|
c4366c |
adds algorithms which are necessary for TLS protocol support and initializes
|
|
|
c4366c |
the SSL library.
|
|
|
c4366c |
|
|
|
c4366c |
To explicitely put the library to the approved mode the application can call
|
|
|
c4366c |
the following function:
|
|
|
c4366c |
|
|
|
c4366c |
- int FIPS_mode_set(int on) - if called with 1 as a parameter it will switch
|
|
|
c4366c |
the library from the non-approved to the approved mode. If any of the selftests
|
|
|
c4366c |
and integrity verification tests fail, the library is put into the error state
|
|
|
c4366c |
and 0 is returned. If they succeed the return value is 1.
|
|
|
c4366c |
|
|
|
c4366c |
To query the module whether it is in the approved mode or not:
|
|
|
c4366c |
|
|
|
c4366c |
- int FIPS_mode(void) - returns 1 if the module is in the approved mode,
|
|
|
c4366c |
0 otherwise.
|
|
|
c4366c |
|
|
|
c4366c |
To query whether the module is in the error state:
|
|
|
c4366c |
|
|
|
c4366c |
- int FIPS_selftest_failed(void) - returns 1 if the module is in the error
|
|
|
c4366c |
state, 0 otherwise.
|
|
|
c4366c |
|
|
|
c4366c |
To zeroize the FIPS RNG key and internal state the application calls:
|
|
|
c4366c |
|
|
|
c4366c |
- void RAND_cleanup(void)
|
|
|
c4366c |
|
|
|
c4366c |
Possible error states of the OpenSSL FIPS module
|
|
|
c4366c |
================================================
|
|
|
c4366c |
|
|
|
c4366c |
The effects of self-test failures in the OpenSSL module differ depending
|
|
|
c4366c |
on the type of self-test that failed.
|
|
|
c4366c |
The FIPS_mode_set() function verifies the integrity of the runtime executable
|
|
|
c4366c |
using a HMAC SHA-256 digest, which is computed at build time. If this computed
|
|
|
c4366c |
HMAC SHA-256 digest matches the stored, known digest, then the power-up
|
|
|
c4366c |
self-test (consisting of the algorithm-specific Pairwise Consistency and Known
|
|
|
c4366c |
Answer tests) is performed.
|
|
|
c4366c |
|
|
|
c4366c |
Non-fatal self-test errors transition the module into an error state. The
|
|
|
c4366c |
application must be restarted to recover from these errors. The non-fatal
|
|
|
c4366c |
self-test errors are:
|
|
|
c4366c |
FIPS_R_FINGERPRINT_DOES_NOT_MATCH - the integrity verification check failed
|
|
|
c4366c |
FIPS_R_FIPS_SELFTEST_FAILED - a known answer test failed
|
|
|
c4366c |
FIPS_R_PAIRWISE_TEST_FAILED – a pairwise consistency test during DSA or RSA
|
|
|
c4366c |
key generation failed
|
|
|
c4366c |
FIPS_R_FIPS_MODE_ALREADY_SET - the application tries to initialize the FIPS
|
|
|
c4366c |
approved mode when it is already initialized
|
|
|
c4366c |
These errors are reported through the regular ERR interface of the OpenSSL
|
|
|
c4366c |
library and can be queried by functions such as ERR_get_error(). See the
|
|
|
c4366c |
OpenSSL manual page for the function description.
|
|
|
c4366c |
|
|
|
c4366c |
A fatal error occurs only when the module is already in the error state
|
|
|
c4366c |
(a self test has failed) and the application calls a crypto function of
|
|
|
c4366c |
the module that cannot return an error in normal circumstances (void return
|
|
|
c4366c |
functions). The error message: 'FATAL FIPS SELFTEST FAILURE' is printed to
|
|
|
c4366c |
stderr and the application is terminated with the abort() call.
|
|
|
c4366c |
The only way to recover from a fatal error is to restart the application.
|
|
|
c4366c |
If failures persist, you must reinstall the Module. If you downloaded the
|
|
|
c4366c |
software, verify the package hash to confirm a proper download.
|