Botan 3.6.1
Crypto and TLS for C&
|
Representation of an LMOTS private key. More...
#include <lm_ots.h>
Public Member Functions | |
const LMOTS_Node & | chain_input (uint16_t chain_idx) const |
The secret chain input at a given chain index. (x[] in RFC 8554 4.2). | |
const LMS_Identifier & | identifier () const |
The LMS identifier of the LMS tree containing this OTS instance ('I' in RFC 8554) | |
LMOTS_Private_Key (const LMOTS_Params ¶ms, const LMS_Identifier &identifier, LMS_Tree_Node_Idx q, const LMS_Seed &seed) | |
Derive a LMOTS private key for a given seed . | |
const LMOTS_Params & | params () const |
The LMOTS parameters. | |
LMS_Tree_Node_Idx | q () const |
The index of the LMS tree leaf associated with this OTS instance. | |
void | sign (StrongSpan< LMOTS_Signature_Bytes > out_sig, const LMS_Message &msg) const |
Generate a new LMOTS signature. | |
Representation of an LMOTS private key.
Contains the OTS params, I, q, the secret LMS seed and its derived secret chain inputs (x[] in RFC 8554 4.2)
Botan::LMOTS_Private_Key::LMOTS_Private_Key | ( | const LMOTS_Params & | params, |
const LMS_Identifier & | identifier, | ||
LMS_Tree_Node_Idx | q, | ||
const LMS_Seed & | seed ) |
Derive a LMOTS private key for a given seed
.
Implements RFC 8554 4.2 using derivation of Appendix A
Definition at line 259 of file lm_ots.cpp.
References Botan::PseudorandomKeyGeneration::gen(), Botan::detail::Strong_Base< T >::get(), Botan::LMOTS_Params::hash(), Botan::OTS_Instance::identifier(), Botan::LMOTS_Params::p(), Botan::OTS_Instance::params(), Botan::OTS_Instance::q(), Botan::PseudorandomKeyGeneration::set_i(), Botan::PseudorandomKeyGeneration::set_j(), and Botan::PseudorandomKeyGeneration::set_q().
|
inline |
The secret chain input at a given chain index. (x[] in RFC 8554 4.2).
Definition at line 272 of file lm_ots.h.
Referenced by Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and sign().
|
inlineinherited |
The LMS identifier of the LMS tree containing this OTS instance ('I' in RFC 8554)
Definition at line 238 of file lm_ots.h.
Referenced by LMOTS_Private_Key(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and sign().
|
inlineinherited |
The LMOTS parameters.
Definition at line 233 of file lm_ots.h.
Referenced by LMOTS_Private_Key(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and sign().
|
inlineinherited |
The index of the LMS tree leaf associated with this OTS instance.
Definition at line 243 of file lm_ots.h.
Referenced by LMOTS_Private_Key(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and sign().
void Botan::LMOTS_Private_Key::sign | ( | StrongSpan< LMOTS_Signature_Bytes > | out_sig, |
const LMS_Message & | msg ) const |
Generate a new LMOTS signature.
Defined in RFC 8554 4.5
Definition at line 276 of file lm_ots.cpp.
References Botan::BufferStuffer::append(), BOTAN_ARG_CHECK, BOTAN_ASSERT_NOMSG, chain_input(), Botan::BufferStuffer::full(), Botan::LMOTS_Params::hash(), Botan::OTS_Instance::identifier(), Botan::BufferStuffer::next(), Botan::LMOTS_Params::p(), Botan::OTS_Instance::params(), Botan::OTS_Instance::q(), Botan::LMOTS_Signature::size(), Botan::StrongSpan< T >::size(), Botan::store_be(), and Botan::CT::unpoison().
Referenced by Botan::LMS_PrivateKey::sign_and_get_pk().