9#include <botan/internal/xmss_common_ops.h>
11#include <botan/internal/xmss_hash.h>
28 hash.
prf(bitmask_l, seed, adrs.
bytes());
32 hash.
prf(bitmask_r, seed, adrs.
bytes());
34 BOTAN_ASSERT(bitmask_l.size() == left.size() && bitmask_r.size() == right.size(),
35 "Bitmask size doesn't match node size.");
38 for(
size_t i = 0; i < left.size(); i++) {
39 concat_xor[i] = left[i] ^ bitmask_l[i];
40 concat_xor[i + left.size()] = right[i] ^ bitmask_r[i];
43 hash.
h(result, key, concat_xor);
52 size_t l = params.
len();
56 for(
size_t i = 0; i < l >> 1; i++) {
61 pk[l >> 1] = pk[l - 1];
63 l = (l >> 1) + (l & 0x01);
#define BOTAN_ASSERT(expr, assertion_made)
void set_key_mask_mode(Key_Mask value)
uint32_t get_tree_height() const
void set_tree_height(uint32_t value)
void set_tree_index(uint32_t value)
const secure_vector< uint8_t > & bytes() const
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)
void prf(secure_vector< uint8_t > &result, std::span< const uint8_t > key, std::span< const uint8_t > data)
void h(secure_vector< uint8_t > &result, std::span< const uint8_t > key, std::span< const uint8_t > data)
size_t element_size() const
std::vector< secure_vector< uint8_t > > wots_keysig_t
std::vector< T, secure_allocator< T > > secure_vector