aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dl_algo/dl_algo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/dl_algo/dl_algo.h')
-rw-r--r--src/lib/pubkey/dl_algo/dl_algo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/pubkey/dl_algo/dl_algo.h b/src/lib/pubkey/dl_algo/dl_algo.h
index 52b38a529..9364f4c5d 100644
--- a/src/lib/pubkey/dl_algo/dl_algo.h
+++ b/src/lib/pubkey/dl_algo/dl_algo.h
@@ -32,6 +32,12 @@ class BOTAN_PUBLIC_API(2,0) DL_Scheme_PublicKey : public virtual Public_Key
const DL_Group& get_domain() const { return m_group; }
/**
+ * Get the DL domain parameters of this key.
+ * @return DL domain parameters of this key
+ */
+ const DL_Group& get_group() const { return m_group; }
+
+ /**
* Get the public value y with y = g^x mod p where x is the secret key.
*/
const BigInt& get_y() const { return m_y; }
@@ -73,6 +79,10 @@ class BOTAN_PUBLIC_API(2,0) DL_Scheme_PublicKey : public virtual Public_Key
const std::vector<uint8_t>& key_bits,
DL_Group::Format group_format);
+ DL_Scheme_PublicKey(const DL_Group& group, const BigInt& y) :
+ m_y(y), m_group(group)
+ {}
+
DL_Scheme_PublicKey& operator=(const DL_Scheme_PublicKey& other) = default;
protected: