Security Scol plugin
|
Interface for all crypto algorithms. More...
#include <cryptlib.h>
Public Member Functions | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. | |
virtual std::string | AlgorithmProvider () const |
Retrieve the provider of this algorithm. | |
Public Member Functions inherited from Clonable | |
virtual Clonable * | Clone () const |
Copies this object. | |
Interface for all crypto algorithms.
Definition at line 598 of file cryptlib.h.
|
inlinevirtual |
Definition at line 601 of file cryptlib.h.
Algorithm::Algorithm | ( | bool | checkSelfTestStatus = true | ) |
Interface for all crypto algorithms.
checkSelfTestStatus | determines whether the object can proceed if the self tests have not been run or failed. |
When FIPS 140-2 compliance is enabled and checkSelfTestStatus == true, this constructor throws SelfTestFailure if the self test hasn't been run or fails.
FIPS 140-2 compliance is disabled by default. It is only used by certain versions of the library when the library is built as a DLL on Windows. Also see CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 in config.h.
Definition at line 46 of file cryptlib.cpp.
|
inlinevirtual |
Provides the name of this algorithm.
The standard algorithm name can be a name like AES
or AES/GCM
. Some algorithms do not have standard names yet. For example, there is no standard algorithm name for Shoup's ECIES.
Reimplemented in Adler32, BLAKE2s, BLAKE2b, CCM_Base, ChaCha20Poly1305_Base, XChaCha20Poly1305_Base, CRC32, CRC32C, ClassNullRNG, AuthenticatedSymmetricCipher, DH_Domain< GROUP_PARAMETERS, COFACTOR_OPTION >, EAX_Base, StreamTransformationFilter, HashFilter, HashVerificationFilter, AuthenticatedDecryptionFilter, SignerFilter, SignatureVerificationFilter, GCM_Base, HKDF< T >, Keccak_Final< T_DigestSize >, LSH224, LSH256, LSH384, LSH512, LSH512_256, Weak1::MD2, CipherModeFinalTemplate_ExternalCipher< ConcretePolicyHolder< Empty, AdditiveCipherTemplate< AbstractPolicyHolder< AdditiveCipherAbstractPolicy, CTR_ModePolicy > > > >, PKCS5_PBKDF1< T >, PKCS5_PBKDF2_HMAC< T >, PKCS12_PBKDF< T >, Scrypt, SHA3_Final< T_DigestSize >, SHA3_Final< 28 >, SHA3_Final< 32 >, SHA3_Final< 48 >, SHA3_Final< 64 >, SHAKE_Final< T_Strength >, SHAKE_Final< 128 >, SHAKE_Final< 256 >, AlgorithmImpl< SimpleKeyingInterfaceImpl< BlockCipher, BTEA_Info >, BTEA_Info >, AlgorithmImpl< SimpleKeyingInterfaceImpl< CBC_MAC_Base, CBC_MAC< T > >, CBC_MAC< T > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< CMAC_Base, CMAC< T > >, CMAC< T > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< CMAC_Base, CMAC< T_BlockCipher > >, CMAC< T_BlockCipher > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< ConcretePolicyHolder< ChaChaTLS_Policy, AdditiveCipherTemplate<> >, ChaChaTLS_Info >, ChaChaTLS_Info >, AlgorithmImpl< SimpleKeyingInterfaceImpl< ConcretePolicyHolder< XChaCha20_Policy, AdditiveCipherTemplate<> >, XChaCha20_Info >, XChaCha20_Info >, AlgorithmImpl< SimpleKeyingInterfaceImpl< DMAC_Base< T >, DMAC_Base< T > >, DMAC_Base< T > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< HMAC_Base, HMAC< H > >, HMAC< H > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< HMAC_Base, HMAC< SHA256 > >, HMAC< SHA256 > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< HMAC_Base, HMAC< T > >, HMAC< T > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< Poly1305_Base< T >, Poly1305_Base< T > >, Poly1305_Base< T > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, ARIA_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Blowfish_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Camellia_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, CAST128_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, CAST256_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, CHAM128_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, CHAM64_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, DES_EDE2_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, DES_EDE3_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, DES_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, DES_XEX3_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, GOST_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, HIGHT_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, IDEA_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, INFO > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Kalyna128_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Kalyna256_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Kalyna512_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, LEA_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, LR_Info< T > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, MARS_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, MDC_Info< H > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, RC2_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, RC5_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, RC6_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Rijndael_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SEED_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Serpent_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SHACAL2_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SHARK_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SIMECK32_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SIMECK64_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SIMON_Info< 16, 16, 16, 32 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SIMON_Info< 8, 12, 12, 16 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SKIPJACK_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SM4_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SPECK_Info< 16, 16, 16, 32 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, SPECK_Info< 8, 12, 12, 16 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Square_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, TEA_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Threefish_Info< 128 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Threefish_Info< 32 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Threefish_Info< 64 > > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, ThreeWay_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, Twofish_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< BlockCipher, XTEA_Info > > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< MessageAuthenticationCode, VariableKeyLength< 32, 0, INT_MAX > > >, PanamaHash< LittleEndian > >, AlgorithmImpl< SimpleKeyingInterfaceImpl< TwoBases< MessageAuthenticationCode, VariableKeyLength< 32, 0, INT_MAX > > >, T_Hash >, AlgorithmImpl< TF_SignerBase, SCHEME_OPTIONS::AlgorithmInfo >, AlgorithmImpl< TF_VerifierBase, SCHEME_OPTIONS::AlgorithmInfo >, BitBucket, VMAC_Base, XTS_ModeBase, and KeyDerivationFunction.
Definition at line 619 of file cryptlib.h.
|
inlinevirtual |
Retrieve the provider of this algorithm.
The algorithm provider can be a name like "C++", "SSE", "NEON", "AESNI", "ARMv8" and "Power8". C++ is standard C++ code. Other labels, like SSE, usually indicate a specialized implementation using instructions from a higher instruction set architecture (ISA). Future labels may include external hardware like a hardware security module (HSM).
Generally speaking Wei Dai's original IA-32 ASM code falls under "SSE2". Labels like "SSSE3" and "SSE4.1" follow after Wei's code and use intrinsics instead of ASM.
Algorithms which combine different instructions or ISAs provide the dominant one. For example on x86 AES/GCM
returns "AESNI" rather than "CLMUL" or "AES+SSE4.1" or "AES+CLMUL" or "AES+SSE4.1+CLMUL".
Reimplemented in BLAKE2s, BLAKE2b, CCM_Base, ChaCha20Poly1305_Base, XChaCha20Poly1305_Base, CMAC_Base, CRC32, CRC32C, AuthenticatedSymmetricCipher, DARN, DMAC_Base< T >, Hash_DRBG< HASH, STRENGTH, SEEDLENGTH >, HMAC_DRBG< HASH, STRENGTH, SEEDLENGTH >, EAX_Base, EAX_Final< T_BlockCipher, T_IsEncryption >, GCM_Base, IteratedHashBase< T_HashWordType, HashTransformation >, IteratedHashBase< word32, HashTransformation >, IteratedHashBase< word32, MessageAuthenticationCode >, IteratedHashBase< word64, HashTransformation >, IteratedHashBase< word64, MessageAuthenticationCode >, LSH256_Base, LSH512_Base, CipherModeBase, PadlockRNG, Poly1305_Base< T >, RDRAND, RDSEED, AdditiveCipherTemplate< BASE >, AdditiveCipherTemplate< AbstractPolicyHolder< AdditiveCipherAbstractPolicy, CTR_ModePolicy > >, CFB_CipherTemplate< AbstractPolicyHolder< CFB_CipherAbstractPolicy, SymmetricCipher > >, VMAC_Base, and XTS_ModeBase.
Definition at line 636 of file cryptlib.h.