Crypto++  8.5
Free C++ class library of cryptographic schemes
Public Member Functions | List of all members
Algorithm Class Reference

Interface for all crypto algorithms. More...

+ Inheritance diagram for Algorithm:

Public Member Functions

 Algorithm (bool checkSelfTestStatus=true)
 Interface for all crypto algorithms. More...
virtual std::string AlgorithmName () const
 Provides the name of this algorithm. More...
virtual std::string AlgorithmProvider () const
 Retrieve the provider of this algorithm. More...
- Public Member Functions inherited from Clonable
virtual ClonableClone () const
 Copies this object. More...

Detailed Description

Interface for all crypto algorithms.

Definition at line 598 of file cryptlib.h.

Constructor & Destructor Documentation

◆ Algorithm()

Algorithm::Algorithm ( bool  checkSelfTestStatus = true)

Interface for all crypto algorithms.

checkSelfTestStatusdetermines 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.

Member Function Documentation

◆ AlgorithmName()

virtual std::string Algorithm::AlgorithmName ( ) const

Provides the name of this algorithm.

the standard algorithm name

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.

AlgorithmName is not universally implemented yet.

Reimplemented in KeyDerivationFunction, AuthenticatedSymmetricCipher, SignatureVerificationFilter, SignerFilter, AuthenticatedDecryptionFilter, HashVerificationFilter, HashFilter, StreamTransformationFilter, BitBucket, BLAKE2b, PKCS12_PBKDF< T >, BLAKE2s, XChaCha20Poly1305_Base, PKCS5_PBKDF2_HMAC< T >, DH_Domain< GROUP_PARAMETERS, COFACTOR_OPTION >, Keccak_Final< T_DigestSize >, SHAKE_Final< T_Strength >, SHA3_Final< T_DigestSize >, HMAC< T >, CRC32C, XTS_ModeBase, Scrypt, PKCS5_PBKDF1< T >, ChaCha20Poly1305_Base, HKDF< T >, GCM_Base, CRC32, Weak::MD2, VMAC_Base, CCM_Base, Adler32, and EAX_Base.

Definition at line 619 of file cryptlib.h.

◆ AlgorithmProvider()

virtual std::string Algorithm::AlgorithmProvider ( ) const

Retrieve the provider of this algorithm.

the algorithm provider

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".

Provider is not universally implemented yet.
Crypto++ 8.0

Reimplemented in AuthenticatedSymmetricCipher, BLAKE2b, AdditiveCipherTemplate< BASE >, HMAC_DRBG< HASH, STRENGTH, SEEDLENGTH >, BLAKE2s, Hash_DRBG< HASH, STRENGTH, SEEDLENGTH >, AutoSeededX917RNG< BLOCK_CIPHER >, SHA384, XChaCha20Poly1305_Base, SHA512, RDSEED, SHA224, PadlockRNG, SHA256, DARN, RDRAND, EAX_Final< T_BlockCipher, T_IsEncryption >, HMAC< T >, Poly1305_Base< T >, CRC32C, XTS_ModeBase, CipherModeBase, SHA1, Weak::PanamaHash< B >, ChaCha20Poly1305_Base, CRC32, Tiger, GCM_Base, CMAC_Base, Whirlpool, DMAC_Base< T >, VMAC_Base, CCM_Base, and EAX_Base.

Definition at line 636 of file cryptlib.h.

The documentation for this class was generated from the following file: