Botan 3.6.1
Crypto and TLS for C&
|
The HSS-LMS parameters. More...
#include <hss.h>
Classes | |
class | LMS_LMOTS_Params_Pair |
Represents a pair of LMS and LMOTS parameters associated with one LMS tree layer. More... | |
Public Member Functions | |
HSS_LMS_Params (std::string_view algo_params) | |
Construct the HSS-LMS parameters form an algorithm parameter string. | |
HSS_LMS_Params (std::vector< LMS_LMOTS_Params_Pair > lm_lmots_params) | |
Construct the HSS-LMS parameters from a vector LMS and LM-OTS parameters. | |
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. | |
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. | |
|
explicit |
Construct the HSS-LMS parameters from a vector LMS and LM-OTS parameters.
Definition at line 77 of file hss.cpp.
References BOTAN_ARG_CHECK.
|
explicit |
Construct the HSS-LMS parameters form an algorithm parameter string.
The HSS/LMS instance to use for creating new keys is defined using an algorithm parameter string, i.e. to define which hash function (hash), LMS tree hights (h) and OTS Winternitz coefficient widths (w) to use. The syntax is the following:
HSS-LMS(<hash>,HW(<h>,<w>),HW(<h>,<w>),...)
e.g. 'HSS-LMS(SHA-256,HW(5,1),HW(5,1))' to use SHA-256 in a two-layer HSS instance with a LMS tree height 5 and w=1. The following parameters are allowed (which are specified in RFC 8554 and draft-fluhrer-lms-more-parm-sets-11):
hash: 'SHA-256', 'Truncated(SHA-256,192)', 'SHAKE-256(256)', SHAKE-256(192) h: '5', '10', '15', '20', '25' w: '1', '2', '4', '8'
Note: The selected hash function is also used for seed derivation.
Definition at line 83 of file hss.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), Botan::SCAN_Name::arg_count(), BOTAN_ARG_CHECK, Botan::checked_cast_to_or_throw(), Botan::LMOTS_Params::create_or_throw(), Botan::LMS_Params::create_or_throw(), and Botan::fmt().
|
inline |
Returns the number of layers the HSS tree has.
Definition at line 103 of file hss.h.
Referenced by Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::HSS_Signature::size(), and Botan::HSS_LMS_PrivateKeyInternal::to_bytes().
|
inline |
|
inline |
Returns the LMS an LM-OTS parameters at the specified level
of the HSS tree.
Definition at line 98 of file hss.h.
References Botan::detail::Strong_Base< T >::get().
Referenced by Botan::HSS_LMS_PrivateKeyInternal::hss_derive_root_lms_private_key(), Botan::HSS_LMS_PrivateKeyInternal::HSS_LMS_PrivateKeyInternal(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::HSS_Signature::size(), and Botan::HSS_LMS_PrivateKeyInternal::to_bytes().