14 m_leaf_idx(0), m_randomness(0, 0x00) {
22 for(
size_t i = 0; i < 4; i++) {
23 m_leaf_idx = ((m_leaf_idx << 8) | raw_sig[i]);
30 auto begin = raw_sig.begin() +
sizeof(uint32_t);
32 std::copy(begin, end, std::back_inserter(m_randomness));
34 for(
size_t i = 0; i < xmss_params.
len(); i++) {
39 std::copy(begin, end, std::back_inserter(m_tree_sig.
ots_signature.back()));
42 for(
size_t i = 0; i < xmss_params.
tree_height(); i++) {
52 std::vector<uint8_t> result{
static_cast<uint8_t
>(m_leaf_idx >> 24U),
53 static_cast<uint8_t
>(m_leaf_idx >> 16U),
54 static_cast<uint8_t
>(m_leaf_idx >> 8U),
55 static_cast<uint8_t
>(m_leaf_idx)};
57 std::copy(m_randomness.begin(), m_randomness.end(), std::back_inserter(result));
59 for(
const auto& sig :
tree().ots_signature) {
60 std::copy(sig.begin(), sig.end(), std::back_inserter(result));
63 for(
const auto& auth :
tree().authentication_path) {
64 std::copy(auth.begin(), auth.end(), std::back_inserter(result));