aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/gcm
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/modes/aead/gcm')
-rw-r--r--src/lib/modes/aead/gcm/gcm.cpp10
-rw-r--r--src/lib/modes/aead/gcm/gcm.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp
index e23551cb4..590c0d0ce 100644
--- a/src/lib/modes/aead/gcm/gcm.cpp
+++ b/src/lib/modes/aead/gcm/gcm.cpp
@@ -185,6 +185,16 @@ std::string GCM_Mode::name() const
return (m_cipher_name + "/GCM");
}
+const char* GCM_Mode::provider() const
+ {
+#if defined(BOTAN_HAS_GCM_CLMUL)
+ if(CPUID::has_clmul())
+ return "clmul";
+#endif
+
+ return "base";
+ }
+
size_t GCM_Mode::update_granularity() const
{
return m_BS;
diff --git a/src/lib/modes/aead/gcm/gcm.h b/src/lib/modes/aead/gcm/gcm.h
index ba0d6cad8..f0176f36a 100644
--- a/src/lib/modes/aead/gcm/gcm.h
+++ b/src/lib/modes/aead/gcm/gcm.h
@@ -36,6 +36,8 @@ class BOTAN_DLL GCM_Mode : public AEAD_Mode
size_t tag_size() const override { return m_tag_size; }
void clear() override;
+
+ const char* provider() const override;
protected:
GCM_Mode(BlockCipher* cipher, size_t tag_size);