A cryptographic module must perform power-up self-tests and conditional self-tests to ensure that it is functional.
Power-up self-tests run automatically after the device powers up. A device goes into FIPS mode only after all self-tests are
successfully completed. If any self-test fails, the device logs a system message and moves into an error state. Also, if the
power-up self test fails, the device fails to boot.
Using a known-answer test (KAT), a cryptographic algorithm is run on data for which the correct output is already known, and
then the calculated output is compared to the previously generated output. If the calculated output does not equal the known
answer, the known-answer test fails.
Power-up self-tests include the following:
-
Software integrity
-
Algorithm tests
Conditional self-tests must be run when an applicable security function or operation is invoked. Unlike the power-up self-tests,
conditional self-tests are executed each time their associated function is accessed.
The device uses a cryptographic algorithm known-answer test (KAT) to test FIPS mode for each FIPS 140-2-approved cryptographic
function (encryption, decryption, authentication, and random number generation) implemented on the device. The device applies
the algorithm to data for which the correct output is already known. It then compares the calculated output to the previously
generated output. If the calculated output does not equal the known answer, the KAT fails.
Conditional self-tests run automatically when an applicable security function or operation is invoked. Unlike the power-up
self-tests, conditional self-tests are executed each time their associated function is accessed.
Conditional self-tests include the following: