5#ifndef CRYPTOPP_IMPORTS
10NAMESPACE_BEGIN(CryptoPP)
14#ifndef CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
15#define CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 0
18#if (CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 && !defined(OS_RNG_AVAILABLE))
19#error FIPS 140-2 compliance requires the availability of OS provided RNG.
24bool FIPS_140_2_ComplianceEnabled()
26 return CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2;
29void SimulatePowerUpSelfTestFailure()
36 return g_powerUpSelfTestStatus;
39#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
43static bool s_inProgress =
false;
46bool PowerUpSelfTestInProgressOnThisThread()
48#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
55void SetPowerUpSelfTestInProgressOnThisThread(
bool inProgress)
57#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
58 s_inProgress = inProgress;
60 CRYPTOPP_UNUSED(inProgress);
66#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
67 EncryptionPairwiseConsistencyTest(encryptor, decryptor);
69 CRYPTOPP_UNUSED(encryptor), CRYPTOPP_UNUSED(decryptor);
73void SignaturePairwiseConsistencyTest_FIPS_140_Only(
const PK_Signer &signer,
const PK_Verifier &verifier)
75#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
76 SignaturePairwiseConsistencyTest(signer, verifier);
78 CRYPTOPP_UNUSED(signer), CRYPTOPP_UNUSED(verifier);
Interface for public-key decryptors.
Interface for public-key encryptors.
Interface for public-key signers.
Interface for public-key signature verifiers.
Classes and functions for the FIPS 140-2 validated library.
PowerUpSelfTestStatus
Status of the power-up self test.
@ POWER_UP_SELF_TEST_NOT_DONE
The self tests have not been performed.
@ POWER_UP_SELF_TEST_FAILED
The self tests were executed via DoPowerUpSelfTest() or DoDllPowerUpSelfTest(), but the result was fa...
Utility functions for the Crypto++ library.