Blame SOURCES/README.FIPS

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