Botan 2.19.3
Crypto and TLS for C&
xmss_wots_addressed_publickey.h
Go to the documentation of this file.
1/**
2 * XMSS WOTS Addressed Public Key
3 * (C) 2016,2017 Matthias Gierlings
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 **/
7
8
9#ifndef BOTAN_XMSS_WOTS_ADDRESSED_PUBLICKEY_H_
10#define BOTAN_XMSS_WOTS_ADDRESSED_PUBLICKEY_H_
11
12#include <botan/internal/xmss_address.h>
13#include <botan/xmss_wots.h>
14
15namespace Botan {
16
17/**
18 * Wrapper class to pair a XMSS_WOTS_PublicKey with an XMSS Address. Since
19 * the PK_Ops::Verification interface does not allow an extra address
20 * parameter to be passed to the sign(RandomNumberGenerator&), the address
21 * needs to be stored together with the key and passed to the
22 * XMSS_WOTS_Verification_Operation() on creation.
23 **/
25 {
26 public:
29
33
36
40
41 const XMSS_WOTS_PublicKey& public_key() const { return m_pub_key; }
43
44 const XMSS_Address& address() const { return m_adrs; }
46
47 std::string algo_name() const override
48 {
49 return m_pub_key.algo_name();
50 }
51
56
57 bool check_key(RandomNumberGenerator& rng, bool strong) const override
58 {
59 return m_pub_key.check_key(rng, strong);
60 }
61
62 std::unique_ptr<PK_Ops::Verification>
63 create_verification_op(const std::string& params,
64 const std::string& provider) const override
65 {
66 return m_pub_key.create_verification_op(params, provider);
67 }
68
69 OID get_oid() const override
70 {
71 return m_pub_key.get_oid();
72 }
73
74 size_t estimated_strength() const override
75 {
77 }
78
79 size_t key_length() const override
80 {
82 }
83
84 std::vector<uint8_t> public_key_bits() const override
85 {
87 }
88
89 protected:
92 };
93
94}
95
96#endif
virtual OID get_oid() const
Definition pk_keys.cpp:53
virtual std::unique_ptr< PK_Ops::Verification > create_verification_op(const std::string &params, const std::string &provider) const
Definition pk_keys.cpp:107
const XMSS_WOTS_PublicKey & public_key() const
XMSS_WOTS_Addressed_PublicKey(const XMSS_WOTS_PublicKey &public_key)
XMSS_WOTS_Addressed_PublicKey(XMSS_WOTS_PublicKey &&public_key, XMSS_Address &&adrs)
std::vector< uint8_t > public_key_bits() const override
bool check_key(RandomNumberGenerator &rng, bool strong) const override
AlgorithmIdentifier algorithm_identifier() const override
std::unique_ptr< PK_Ops::Verification > create_verification_op(const std::string &params, const std::string &provider) const override
XMSS_WOTS_Addressed_PublicKey(XMSS_WOTS_PublicKey &&public_key)
XMSS_WOTS_Addressed_PublicKey(const XMSS_WOTS_PublicKey &public_key, const XMSS_Address &adrs)
size_t estimated_strength() const override
Definition xmss_wots.h:351
std::vector< uint8_t > public_key_bits() const override
Definition xmss_wots.h:361
AlgorithmIdentifier algorithm_identifier() const override
Definition xmss_wots.h:341
bool check_key(RandomNumberGenerator &, bool) const override
Definition xmss_wots.h:346
std::string algo_name() const override
Definition xmss_wots.h:336
Definition bigint.h:1143