aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-11-12 02:46:21 -0500
committerJack Lloyd <[email protected]>2016-11-12 02:46:21 -0500
commitaa7503986177f51939c67425f0d03fb83a07c812 (patch)
tree335823c66b078190eea30d727ebca90c126e69c4 /src/lib/pubkey
parent77a1c2648838ac5dd401153aca349c5eae390d7e (diff)
Fixes for XMSS wrt 9c72dabc9
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r--src/lib/pubkey/xmss/xmss_publickey.h4
-rw-r--r--src/lib/pubkey/xmss/xmss_signature_operation.h10
-rw-r--r--src/lib/pubkey/xmss/xmss_verification_operation.h15
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_privatekey.h2
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_publickey.h6
5 files changed, 6 insertions, 31 deletions
diff --git a/src/lib/pubkey/xmss/xmss_publickey.h b/src/lib/pubkey/xmss/xmss_publickey.h
index a18c70836..049a617ca 100644
--- a/src/lib/pubkey/xmss/xmss_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_publickey.h
@@ -210,9 +210,9 @@ class BOTAN_DLL XMSS_PublicKey : public virtual Public_Key
return m_xmss_params.estimated_strength();
}
- virtual size_t max_input_bits() const override
+ virtual size_t key_length() const override
{
- throw Not_Implemented("XMSS doesn't support max_input_bits().");
+ return m_xmss_params.estimated_strength();
}
/**
diff --git a/src/lib/pubkey/xmss/xmss_signature_operation.h b/src/lib/pubkey/xmss/xmss_signature_operation.h
index da84abdbc..ff13f4c8b 100644
--- a/src/lib/pubkey/xmss/xmss_signature_operation.h
+++ b/src/lib/pubkey/xmss/xmss_signature_operation.h
@@ -42,16 +42,6 @@ class BOTAN_DLL XMSS_Signature_Operation : public virtual PK_Ops::Signature,
XMSS_Signature_Operation(const XMSS_PrivateKey& private_key);
virtual ~XMSS_Signature_Operation() {}
- virtual size_t message_part_size() const override
- {
- return m_priv_key.message_part_size();
- }
-
- virtual size_t message_parts() const override
- {
- return m_priv_key.message_parts();
- }
-
/**
* Creates an XMSS signature for the message provided through call to
* update().
diff --git a/src/lib/pubkey/xmss/xmss_verification_operation.h b/src/lib/pubkey/xmss/xmss_verification_operation.h
index 6759e3d43..71e7c8d65 100644
--- a/src/lib/pubkey/xmss/xmss_verification_operation.h
+++ b/src/lib/pubkey/xmss/xmss_verification_operation.h
@@ -37,21 +37,6 @@ namespace Botan {
virtual ~XMSS_Verification_Operation() {}
- virtual size_t max_input_bits() const override
- {
- return m_pub_key.max_input_bits();
- }
-
- virtual size_t message_part_size() const override
- {
- return m_pub_key.message_part_size();
- }
-
- virtual size_t message_parts() const override
- {
- return m_pub_key.message_parts();
- }
-
virtual bool is_valid_signature(const byte sig[],
size_t sig_len) override;
diff --git a/src/lib/pubkey/xmss/xmss_wots_privatekey.h b/src/lib/pubkey/xmss/xmss_wots_privatekey.h
index 2c38faad6..1a6e50fe8 100644
--- a/src/lib/pubkey/xmss/xmss_wots_privatekey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_privatekey.h
@@ -234,7 +234,7 @@ class BOTAN_DLL XMSS_WOTS_PrivateKey : public virtual XMSS_WOTS_PublicKey,
virtual std::unique_ptr<PK_Ops::Signature>
create_signature_op(RandomNumberGenerator&,
const std::string&,
- const std::string& provider) const override
+ const std::string&) const override
{
BOTAN_ASSERT(false, "XMSS_WOTS_Signature_Operation not available.");
}
diff --git a/src/lib/pubkey/xmss/xmss_wots_publickey.h b/src/lib/pubkey/xmss/xmss_wots_publickey.h
index e024c486f..a3e5232e8 100644
--- a/src/lib/pubkey/xmss/xmss_wots_publickey.h
+++ b/src/lib/pubkey/xmss/xmss_wots_publickey.h
@@ -243,7 +243,7 @@ class BOTAN_DLL XMSS_WOTS_PublicKey : virtual public Public_Key
virtual std::unique_ptr<PK_Ops::Verification>
create_verification_op(const std::string&,
- const std::string& provider) const override
+ const std::string&) const override
{
BOTAN_ASSERT(false, "XMSS_WOTS_Verification_Operation not available.");
}
@@ -253,9 +253,9 @@ class BOTAN_DLL XMSS_WOTS_PublicKey : virtual public Public_Key
return m_wots_params.estimated_strength();
}
- virtual size_t max_input_bits() const override
+ virtual size_t key_length() const override
{
- return message_part_size() * 8;
+ return m_wots_params.estimated_strength();
}
virtual size_t message_part_size() const override