aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/dsa
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-09 14:05:29 -0400
committerJack Lloyd <[email protected]>2018-08-10 10:12:49 -0400
commit1e18edf2673519c8f8c01dbbaacc5a189f0c0a92 (patch)
tree40a7c64752842ce9298de220860af38fe80bb882 /src/lib/pubkey/dsa
parentfe242c20a01ae2e8a4589c353cdbc080ae629487 (diff)
Add PK_Signer::signature_length
Diffstat (limited to 'src/lib/pubkey/dsa')
-rw-r--r--src/lib/pubkey/dsa/dsa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/pubkey/dsa/dsa.cpp b/src/lib/pubkey/dsa/dsa.cpp
index 35240292c..412270173 100644
--- a/src/lib/pubkey/dsa/dsa.cpp
+++ b/src/lib/pubkey/dsa/dsa.cpp
@@ -89,7 +89,8 @@ class DSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA
m_b_inv = m_group.inverse_mod_q(m_b);
}
- size_t max_input_bits() const override { return m_group.get_q().bits(); }
+ size_t signature_length() const override { return 2*m_group.q_bytes(); }
+ size_t max_input_bits() const override { return m_group.q_bits(); }
secure_vector<uint8_t> raw_sign(const uint8_t msg[], size_t msg_len,
RandomNumberGenerator& rng) override;
@@ -157,7 +158,7 @@ class DSA_Verification_Operation final : public PK_Ops::Verification_with_EMSA
{
}
- size_t max_input_bits() const override { return m_group.get_q().bits(); }
+ size_t max_input_bits() const override { return m_group.q_bits(); }
bool with_recovery() const override { return false; }