12#include <botan/asn1_obj.h>
14#include <botan/internal/int_utils.h>
15#include <botan/internal/lms.h>
61 m_lms_params(std::move(p_lms_params)), m_lmots_params(std::move(p_lmots_params)) {}
71 explicit HSS_LMS_Params(std::vector<LMS_LMOTS_Params_Pair> lm_lmots_params);
102 HSS_Level L()
const {
return checked_cast_to<HSS_Level>(m_lms_lmots_params.size()); }
115 std::vector<LMS_LMOTS_Params_Pair> m_lms_lmots_params;
142 static std::shared_ptr<HSS_LMS_PrivateKeyInternal> from_bytes_or_throw(std::span<const uint8_t> key_bytes);
229 const size_t m_sig_size;
257 static std::shared_ptr<HSS_LMS_PublicKeyInternal> from_bytes_or_throw(std::span<const uint8_t> key_bytes);
260 m_L(L), m_top_lms_pub_key(std::move(top_lms_pub_key)) {}
265 std::vector<uint8_t> to_bytes()
const;
285 OID object_identifier()
const;
351 static HSS_Signature from_bytes_or_throw(std::span<const uint8_t> sig_bytes);
384 m_signed_pub_keys(std::move(signed_pub_keys)), m_sig(std::move(sig)) {}
386 std::vector<Signed_Pub_Key> m_signed_pub_keys;
Represents a pair of LMS and LMOTS parameters associated with one LMS tree layer.
const LMS_Params & lms_params() const
The LMS parameters.
const LMOTS_Params & lmots_params() const
The LMOTS parameters.
LMS_LMOTS_Params_Pair(LMS_Params p_lms_params, LMOTS_Params p_lmots_params)
Construct a new params pair.
const LMS_LMOTS_Params_Pair & params_at_level(HSS_Level level) const
Returns the LMS an LM-OTS parameters at the specified level of the HSS tree.
HSS_Level L() const
Returns the number of layers the HSS tree has.
HSS_Sig_Idx max_sig_count() const
The maximal number of signatures allowed for these HSS parameters.
The internal HSS-LMS private key.
HSS_Sig_Idx get_idx() const
Get the idx of the next signature to generate.
const HSS_LMS_Params & hss_params() const
Returns the used HSS-LMS parameters.
size_t signature_size() const
Returns the size in bytes of a signature created by this key.
The internal HSS-LMS public key.
std::string algo_name() const
The algorithm name for HSS-LMS.
HSS_LMS_PublicKeyInternal(HSS_Level L, LMS_PublicKey top_lms_pub_key)
const LMS_PublicKey & lms_pub_key() const
Returns the public LMS key of the top LMS tree.
A LMS public key signed by the HSS layer above it.
const LMS_Signature & signature() const
The signature of the public key.
const LMS_PublicKey & public_key() const
The signed public key.
const LMS_Signature & bottom_sig() const
Returns the LMS signature by the bottom layer of the signed message.
HSS_Level Nspk() const
Returns the number of signed public keys (Nspk = L-1).
const Signed_Pub_Key & signed_pub_key(HSS_Level layer) const
Returns the signed LMS key signed by a specific layer.
Representation of an LMS Private key.
Container for LMS Signature data.
int(* final)(unsigned char *, CTX *)
bool verify_signature(std::span< const uint8_t, ED448_LEN > pk, bool phflag, std::span< const uint8_t > context, std::span< const uint8_t > sig, std::span< const uint8_t > msg)
Verify a signature(RFC 8032 5.2.7)
std::vector< T, secure_allocator< T > > secure_vector