13#include <botan/internal/xmss_wots.h>
15#include <botan/internal/stl_util.h>
16#include <botan/internal/xmss_address.h>
17#include <botan/internal/xmss_tools.h>
44void chain(
const XMSS_WOTS_Parameters& params,
49 std::span<const uint8_t> seed,
60 for(
size_t i = start_idx; i < (start_idx + steps) && i < params.wots_parameter(); i++) {
61 adrs.set_hash_address(
static_cast<uint32_t
>(i));
65 hash.prf(prf_output, seed, adrs.bytes());
66 xor_buf(result.data(), prf_output.data(), result.size());
72 hash.prf(prf_output, seed, adrs.bytes());
73 hash.f(result, prf_output, result);
80 std::span<const uint8_t> public_seed,
92 std::span<const uint8_t> public_seed,
115 std::span<const uint8_t> public_seed,
125 chain(
m_params, sig[i], 0, msg_digest[i], adrs, public_seed, hash);
132 std::span<const uint8_t> public_seed,
133 std::span<const uint8_t> private_seed,
147 std::span<const uint8_t> private_seed,
154 hash.
prf(r, private_seed, adrs.
bytes());
#define BOTAN_ASSERT_NOMSG(expr)
void set_chain_address(uint32_t value)
const secure_vector< uint8_t > & bytes() const
void prf(secure_vector< uint8_t > &result, std::span< const uint8_t > key, std::span< const uint8_t > data)
void prf_keygen(secure_vector< uint8_t > &result, std::span< const uint8_t > key, std::span< const uint8_t > data)
const wots_keysig_t & key_data() const
XMSS_WOTS_Parameters m_params
size_t wots_parameter() const
secure_vector< uint8_t > base_w(const secure_vector< uint8_t > &msg, size_t out_size) const
void append_checksum(secure_vector< uint8_t > &data) const
XMSS_WOTS_PrivateKey(XMSS_WOTS_Parameters params, std::span< const uint8_t > public_seed, std::span< const uint8_t > private_seed, XMSS_Address adrs, XMSS_Hash &hash)
wots_keysig_t sign(const secure_vector< uint8_t > &msg, std::span< const uint8_t > public_seed, XMSS_Address &adrs, XMSS_Hash &hash)
XMSS_WOTS_PublicKey(XMSS_WOTS_Parameters params, std::span< const uint8_t > public_seed, const XMSS_WOTS_PrivateKey &private_key, XMSS_Address &adrs, XMSS_Hash &hash)
std::vector< secure_vector< uint8_t > > wots_keysig_t
constexpr auto concat(Rs &&... ranges)
constexpr void xor_buf(ranges::contiguous_output_range< uint8_t > auto &&out, ranges::contiguous_range< uint8_t > auto &&in)
std::vector< T, secure_allocator< T > > secure_vector