summaryrefslogtreecommitdiff
path: root/cryptlib.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-03-19 15:08:33 -0400
committerJeffrey Walton <noloader@gmail.com>2021-03-19 15:08:33 -0400
commit793f795ef3b3737bbb3d8b00ea8e6a0dabae11ab (patch)
treeea087c6dee958f9d423fbcd46ebbfe3a1c37485e /cryptlib.h
parent52b22c26725042ba0861510bb58eb46d74efed89 (diff)
downloadcryptopp-git-793f795ef3b3737bbb3d8b00ea8e6a0dabae11ab.tar.gz
Update cryptest-coverage.sh script
Diffstat (limited to 'cryptlib.h')
-rw-r--r--cryptlib.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/cryptlib.h b/cryptlib.h
index f7bb58de..6fe6b2bb 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -1400,6 +1400,23 @@ public:
/// Shoup's ECIES.
virtual std::string AlgorithmName() const;
+ /// \brief Retrieve the provider of this algorithm
+ /// \return the algorithm provider
+ /// \details 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).
+ /// \details 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.
+ /// \details Algorithms which combine different instructions or ISAs provide the
+ /// dominant one. For example on x86 <tt>AES/GCM</tt> returns "AESNI" rather than
+ /// "CLMUL" or "AES+SSE4.1" or "AES+CLMUL" or "AES+SSE4.1+CLMUL".
+ /// \note Provider is not universally implemented yet.
+ /// \since Crypto++ 8.0
+ virtual std::string AlgorithmProvider() const {return "C++";}
+
protected:
const Algorithm & GetAlgorithm() const
{return *static_cast<const MessageAuthenticationCode *>(this);}