11#include <botan/internal/xmss_verification_operation.h>
13#include <botan/internal/xmss_common_ops.h>
14#include <botan/internal/xmss_tools.h>
20 m_pub_key(public_key), m_hash(public_key.xmss_parameters()), m_msg_buf(0) {}
37 std::array<secure_vector<uint8_t>, 2> node;
43 for(
size_t k = 0; k < params.tree_height(); k++) {
45 if(((next_index / (
static_cast<size_t>(1) << k)) & 0x01) == 0) {
59bool XMSS_Verification_Operation::verify(
const XMSS_Signature& sig,
61 const XMSS_PublicKey& public_key) {
69 return (node == public_key.root());
80 m_msg_buf.insert(m_msg_buf.end(), input.begin(), input.end());
86 bool result = verify(signature, m_msg_buf, m_pub_key);
void set_ots_address(uint32_t value)
uint32_t get_tree_index() const
void set_tree_height(uint32_t value)
void set_tree_index(uint32_t value)
void set_ltree_address(uint32_t value)
static void create_l_tree(secure_vector< uint8_t > &result, wots_keysig_t pk, XMSS_Address &adrs, const secure_vector< uint8_t > &seed, XMSS_Hash &hash, const XMSS_Parameters ¶ms)
static void randomize_tree_hash(secure_vector< uint8_t > &result, const secure_vector< uint8_t > &left, const secure_vector< uint8_t > &right, XMSS_Address &adrs, const secure_vector< uint8_t > &seed, XMSS_Hash &hash, const XMSS_Parameters ¶ms)
secure_vector< uint8_t > h_msg(std::span< const uint8_t > randomness, std::span< const uint8_t > root, std::span< const uint8_t > index_bytes, std::span< const uint8_t > data)
xmss_algorithm_t oid() const
size_t element_size() const
const XMSS_Parameters & xmss_parameters() const
const XMSS_Signature::TreeSignature & tree() const
size_t unused_leaf_index() const
bool is_valid_signature(std::span< const uint8_t > sign) override
XMSS_Verification_Operation(const XMSS_PublicKey &public_key)
void update(std::span< const uint8_t > input) override
std::vector< T, secure_allocator< T > > secure_vector
wots_keysig_t authentication_path
wots_keysig_t ots_signature