Botan 3.6.1
Crypto and TLS for C&
|
#include <xmss_wots.h>
Public Member Functions | |
const wots_keysig_t & | key_data () const |
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_PrivateKey (XMSS_WOTS_Parameters params, std::span< const uint8_t > private_seed, XMSS_Address adrs, XMSS_Hash &hash) | |
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) | |
Protected Attributes | |
wots_keysig_t | m_key_data |
XMSS_WOTS_Parameters | m_params |
A Winternitz One Time Signature private key for use with Extended Hash-Based Signatures.
Definition at line 98 of file xmss_wots.h.
Botan::XMSS_WOTS_PrivateKey::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 ) |
Algorithm 3: "Generating a WOTS+ Private Key". Generates a private key.
Note that this is implemented according to the recommendations in NIST SP.800-208 Section 6.2 to avoid a multi-target attack vulnerability. This does not influence the sign/verify interoperability with implementations that do not implement this recommendation.
This overload is used in multithreaded scenarios, where it is required to provide seperate instances of XMSS_Hash to each thread.
params | The WOTS parameters to use |
public_seed | The public seed for the private key generation |
private_seed | The private seed for the private key generation |
adrs | The address of the key to retrieve. |
hash | Instance of XMSS_Hash, that may only be used by the thread executing at. |
Definition at line 131 of file xmss_wots.cpp.
References Botan::XMSS_WOTS_Parameters::len(), Botan::XMSS_WOTS_Base::m_key_data, and Botan::XMSS_WOTS_Base::m_params.
Botan::XMSS_WOTS_PrivateKey::XMSS_WOTS_PrivateKey | ( | XMSS_WOTS_Parameters | params, |
std::span< const uint8_t > | private_seed, | ||
XMSS_Address | adrs, | ||
XMSS_Hash & | hash ) |
Constructor for the old derivation logic. Creates a WOTS+ private key using the old key derivation logic, i.e. the logic WITHOUT the recommendations in NIST SP.800-208. It is used to support XMSS_PrivateKeys created before the derivation logic was updated.
params | The WOTS parameters to use |
private_seed | The private seed for the private key generation |
adrs | The address of the key to retrieve. |
hash | Instance of XMSS_Hash, that may only be used by the thread executing it. |
Definition at line 146 of file xmss_wots.cpp.
References Botan::XMSS_Address::bytes(), Botan::XMSS_WOTS_Parameters::len(), Botan::XMSS_WOTS_Base::m_key_data, Botan::XMSS_WOTS_Base::m_params, and Botan::XMSS_Hash::prf().
|
inlineinherited |
Definition at line 38 of file xmss_wots.h.
References Botan::XMSS_WOTS_Base::m_key_data.
Referenced by sign().
wots_keysig_t Botan::XMSS_WOTS_PrivateKey::sign | ( | const secure_vector< uint8_t > & | msg, |
std::span< const uint8_t > | public_seed, | ||
XMSS_Address & | adrs, | ||
XMSS_Hash & | hash ) |
Algorithm 5: "WOTS_sign" Generates a signature from a private key and a message.
This overload is used in multithreaded scenarios, where it is required to provide seperate instances of XMSS_Hash to each thread.
msg | A message to sign. |
public_seed | The public seed to use for the signature |
adrs | An OTS hash address identifying the WOTS+ key pair used for signing. |
hash | Instance of XMSS_Hash, that may only be used by the thread executing sign. |
Definition at line 114 of file xmss_wots.cpp.
References Botan::XMSS_WOTS_Parameters::append_checksum(), Botan::XMSS_WOTS_Parameters::base_w(), Botan::XMSS_WOTS_Base::key_data(), Botan::XMSS_WOTS_Parameters::len(), Botan::XMSS_WOTS_Parameters::len_1(), Botan::XMSS_WOTS_Base::m_params, and Botan::XMSS_Address::set_chain_address().
|
protectedinherited |
Definition at line 42 of file xmss_wots.h.
Referenced by Botan::XMSS_WOTS_Base::key_data(), XMSS_WOTS_PrivateKey(), XMSS_WOTS_PrivateKey(), Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
|
protectedinherited |
Definition at line 41 of file xmss_wots.h.
Referenced by sign(), XMSS_WOTS_PrivateKey(), XMSS_WOTS_PrivateKey(), Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().