8 #ifndef BOTAN_XMSS_WOTS_PUBLICKEY_H_
9 #define BOTAN_XMSS_WOTS_PUBLICKEY_H_
14 #include <botan/alg_id.h>
15 #include <botan/rng.h>
16 #include <botan/asn1_oid.h>
17 #include <botan/exceptn.h>
18 #include <botan/pk_keys.h>
19 #include <botan/types.h>
20 #include <botan/xmss_wots_parameters.h>
21 #include <botan/xmss_address.h>
22 #include <botan/xmss_hash.h>
41 const wots_keysig_t& auth_path)
42 : m_ots_sig(ots_sig), m_auth_path(auth_path)
46 wots_keysig_t&& auth_path)
47 : m_ots_sig(
std::move(ots_sig)),
48 m_auth_path(
std::move(auth_path))
72 wots_keysig_t m_ots_sig;
73 wots_keysig_t m_auth_path;
147 const wots_keysig_t& key)
167 const wots_keysig_t& sig,
172 m_key(pub_key_from_signature(msg,
193 operator const wots_keysig_t& ()
const {
return m_key; }
199 operator wots_keysig_t& () {
return m_key; }
241 throw Not_Implemented(
"No AlgorithmIdentifier available for XMSS-WOTS.");
271 return !(*
this == key);
322 chain(x, start_idx, steps, adrs, public_seed,
m_hash);
343 wots_keysig_t pub_key_from_signature(
345 const wots_keysig_t& sig,
TreeSignature(wots_keysig_t &&ots_sig, wots_keysig_t &&auth_path)
const std::string & name() const
void set_public_seed(secure_vector< uint8_t > &&public_seed)
wots_keysig_t & authentication_path()
void set_public_seed(const secure_vector< uint8_t > &public_seed)
int(* final)(unsigned char *, CTX *)
TreeSignature(const wots_keysig_t &ots_sig, const wots_keysig_t &auth_path)
secure_vector< uint8_t > & public_seed()
secure_vector< uint8_t > m_public_seed
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, secure_vector< uint8_t > public_seed)
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, const secure_vector< uint8_t > &msg, const wots_keysig_t &sig, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed)
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, RandomNumberGenerator &rng)
size_t estimated_strength() const override
const secure_vector< uint8_t > & public_seed() const
bool check_key(RandomNumberGenerator &, bool) const override
void chain(secure_vector< uint8_t > &x, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed, XMSS_Hash &hash)
std::vector< T, secure_allocator< T >> secure_vector
const wots_keysig_t & ots_signature() const
std::vector< uint8_t > public_key_bits() const override
secure_vector< uint8_t > & operator[](size_t i)
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid)
const secure_vector< uint8_t > & operator[](size_t i) const
bool operator!=(const XMSS_WOTS_PublicKey &key)
std::vector< secure_vector< uint8_t > > wots_keysig_t
size_t estimated_strength() const
void set_key_data(const wots_keysig_t &key_data)
const XMSS_WOTS_Parameters & wots_parameters() const
bool operator==(const XMSS_WOTS_PublicKey &key)
void set_key_data(wots_keysig_t &&key_data)
void chain(secure_vector< uint8_t > &x, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed)
AlgorithmIdentifier algorithm_identifier() const override
wots_keysig_t & ots_signature()
wots_keysig_t & key_data()
size_t key_length() const override
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, secure_vector< uint8_t > &&public_seed, wots_keysig_t &&key)
const wots_keysig_t & key_data() const
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters::ots_algorithm_t oid, const secure_vector< uint8_t > &public_seed, const wots_keysig_t &key)
XMSS_WOTS_Parameters m_wots_params
const wots_keysig_t & authentication_path() const
std::string algo_name() const override