aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/xmss/xmss_wots_privatekey.cpp
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2016-11-06 22:20:20 +0100
committerMatthias Gierlings <[email protected]>2016-11-12 21:00:31 +0100
commit8ae1f77cf639e2589efb8ac12dc689029737b3be (patch)
treeb25060008081b8d7e4d5c7d7c234b2ac454e140f /src/lib/pubkey/xmss/xmss_wots_privatekey.cpp
parentd16fd1d9b35698852e7b7aed023dc5057d630098 (diff)
Adds optional XMSS WOTS stand-alone components
The main XMSS implementation does not expose stand-alone access to XMSS Winternitz One Time Signatures through the Botan::PK_Ops interfaces. XMSS WOTS is used by XMSS internally though. This PR implements a possible XMSS WOTS interface for stand-alone use. XMSS WOTS is tested through the XMSS tests, therefore there are no dedicated XMSS WOTS test vectors and test bench components implemented in this PR.
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_wots_privatekey.cpp')
-rw-r--r--src/lib/pubkey/xmss/xmss_wots_privatekey.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/pubkey/xmss/xmss_wots_privatekey.cpp b/src/lib/pubkey/xmss/xmss_wots_privatekey.cpp
index 1a68b187d..13568e0b9 100644
--- a/src/lib/pubkey/xmss/xmss_wots_privatekey.cpp
+++ b/src/lib/pubkey/xmss/xmss_wots_privatekey.cpp
@@ -8,6 +8,7 @@
* Botan is released under the Simplified BSD License (see license.txt)
**/
+#include <botan/internal/xmss_wots_signature_operation.h>
#include <botan/xmss_wots_privatekey.h>
namespace Botan {
@@ -77,4 +78,16 @@ XMSS_WOTS_PrivateKey::sign(
return sig;
}
+std::unique_ptr<PK_Ops::Signature>
+XMSS_WOTS_PrivateKey::create_signature_op(RandomNumberGenerator&,
+ const std::string&,
+ const std::string& provider) const
+ {
+ if(provider == "base" || provider.empty())
+ return std::unique_ptr<PK_Ops::Signature>(
+ new XMSS_WOTS_Signature_Operation(*this));
+
+ throw Provider_Not_Found(algo_name(), provider);
+ }
+
}