Go to the documentation of this file.00001 #ifndef CRYPTOPP_FIPS140_H
00002 #define CRYPTOPP_FIPS140_H
00003
00004
00005
00006
00007
00008 #include "cryptlib.h"
00009 #include "secblock.h"
00010
00011 NAMESPACE_BEGIN(CryptoPP)
00012
00013
00014 class CRYPTOPP_DLL SelfTestFailure : public Exception
00015 {
00016 public:
00017 explicit SelfTestFailure(const std::string &s) : Exception(OTHER_ERROR, s) {}
00018 };
00019
00020
00021 CRYPTOPP_DLL bool CRYPTOPP_API FIPS_140_2_ComplianceEnabled();
00022
00023
00024 enum PowerUpSelfTestStatus {POWER_UP_SELF_TEST_NOT_DONE, POWER_UP_SELF_TEST_FAILED, POWER_UP_SELF_TEST_PASSED};
00025
00026
00027 CRYPTOPP_DLL void CRYPTOPP_API DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleMac);
00028
00029
00030 CRYPTOPP_DLL void CRYPTOPP_API DoDllPowerUpSelfTest();
00031
00032
00033 CRYPTOPP_DLL void CRYPTOPP_API SimulatePowerUpSelfTestFailure();
00034
00035
00036 CRYPTOPP_DLL PowerUpSelfTestStatus CRYPTOPP_API GetPowerUpSelfTestStatus();
00037
00038 typedef PowerUpSelfTestStatus (CRYPTOPP_API * PGetPowerUpSelfTestStatus)();
00039
00040 CRYPTOPP_DLL MessageAuthenticationCode * CRYPTOPP_API NewIntegrityCheckingMAC();
00041
00042 CRYPTOPP_DLL bool CRYPTOPP_API IntegrityCheckModule(const char *moduleFilename, const byte *expectedModuleMac, SecByteBlock *pActualMac = NULL, unsigned long *pMacFileLocation = NULL);
00043
00044
00045 bool PowerUpSelfTestInProgressOnThisThread();
00046
00047 void SetPowerUpSelfTestInProgressOnThisThread(bool inProgress);
00048
00049 void SignaturePairwiseConsistencyTest(const PK_Signer &signer, const PK_Verifier &verifier);
00050 void EncryptionPairwiseConsistencyTest(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor);
00051
00052 void SignaturePairwiseConsistencyTest_FIPS_140_Only(const PK_Signer &signer, const PK_Verifier &verifier);
00053 void EncryptionPairwiseConsistencyTest_FIPS_140_Only(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor);
00054
00055 #define CRYPTOPP_DUMMY_DLL_MAC "MAC_51f34b8db820ae8"
00056
00057 NAMESPACE_END
00058
00059 #endif