Botan
2.1.0
Crypto and TLS for C++11
|
#include <xmss_signature_operation.h>
Public Member Functions | |
secure_vector< uint8_t > | sign (RandomNumberGenerator &) override |
void | update (const uint8_t msg[], size_t msg_len) override |
XMSS_Signature_Operation (const XMSS_PrivateKey &private_key) | |
virtual | ~XMSS_Signature_Operation ()=default |
Protected Member Functions | |
void | create_l_tree (secure_vector< uint8_t > &result, wots_keysig_t pk, XMSS_Address &adrs, const secure_vector< uint8_t > &seed) |
void | randomize_tree_hash (secure_vector< uint8_t > &result, const secure_vector< uint8_t > &left, const secure_vector< uint8_t > &right, XMSS_Address &adrs, const secure_vector< uint8_t > &seed) |
Protected Attributes | |
XMSS_Hash | m_hash |
XMSS_Parameters | m_xmss_params |
Signature generation operation for Extended Hash-Based Signatures (XMSS) as defined in:
[1] XMSS: Extended Hash-Based Signatures, draft-itrf-cfrg-xmss-hash-based-signatures-06 Release: July 2016. https://datatracker.ietf.org/doc/ draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1
Definition at line 36 of file xmss_signature_operation.h.
Botan::XMSS_Signature_Operation::XMSS_Signature_Operation | ( | const XMSS_PrivateKey & | private_key | ) |
Definition at line 21 of file xmss_signature_operation.cpp.
|
virtualdefault |
|
protectedinherited |
Algorithm 8: "ltree" Create an L-tree used to compute the leaves of the binary hash tree. Takes a WOTS+ public key and compresses it to a single n-byte value.
[out] | result | Public key compressed to a single n-byte value pk[0]. |
[in] | pk | Winternitz One Time Signatures+ public key. |
[in] | adrs | Address encoding the address of the L-Tree |
[in] | seed | The seed generated during the public key generation. |
Definition at line 45 of file xmss_common_ops.cpp.
References Botan::XMSS_Address::get_tree_height(), Botan::XMSS_Parameters::len(), Botan::XMSS_Common_Ops::m_xmss_params, Botan::XMSS_Common_Ops::randomize_tree_hash(), Botan::XMSS_Address::set_tree_height(), and Botan::XMSS_Address::set_tree_index().
Referenced by Botan::XMSS_PrivateKey::tree_hash().
|
protectedinherited |
Algorithm 7: "RAND_HASH"
Generates a randomized hash.
[out] | result | The resulting randomized hash. |
[in] | left | Left half of the hash function input. |
[in] | right | Right half of the hash function input. |
[in] | adrs | Adress of the hash function call. |
[in] | seed | The seed for G. |
Definition at line 14 of file xmss_common_ops.cpp.
References BOTAN_ASSERT, Botan::XMSS_Address::bytes(), Botan::XMSS_Parameters::element_size(), Botan::XMSS_Hash::h(), Botan::XMSS_Address::Key_Mode, Botan::XMSS_Common_Ops::m_hash, Botan::XMSS_Common_Ops::m_xmss_params, Botan::XMSS_Address::Mask_LSB_Mode, Botan::XMSS_Address::Mask_MSB_Mode, Botan::XMSS_Hash::prf(), and Botan::XMSS_Address::set_key_mask_mode().
Referenced by Botan::XMSS_Common_Ops::create_l_tree(), and Botan::XMSS_PrivateKey::tree_hash().
|
overridevirtual |
Creates an XMSS signature for the message provided through call to update().
Implements Botan::PK_Ops::Signature.
Definition at line 79 of file xmss_signature_operation.cpp.
References Botan::XMSS_Hash::h_msg_final(), and Botan::XMSS_Common_Ops::m_hash.
|
overridevirtual |
Implements Botan::PK_Ops::Signature.
Definition at line 71 of file xmss_signature_operation.cpp.
References Botan::XMSS_Hash::h_msg_update(), and Botan::XMSS_Common_Ops::m_hash.
|
protectedinherited |
Definition at line 69 of file xmss_common_ops.h.
Referenced by Botan::XMSS_Common_Ops::randomize_tree_hash(), sign(), and update().
|
protectedinherited |
Definition at line 68 of file xmss_common_ops.h.
Referenced by Botan::XMSS_Common_Ops::create_l_tree(), and Botan::XMSS_Common_Ops::randomize_tree_hash().