|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <xmss_common_ops.h>
Public Member Functions | |
| XMSS_Common_Ops (XMSS_Parameters::xmss_algorithm_t oid) | |
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, XMSS_Hash &hash) |
| 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, XMSS_Hash &hash) |
| 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 |
Operations shared by XMSS signature generation and verification operations.
Definition at line 26 of file xmss_common_ops.h.
|
inline |
Definition at line 29 of file xmss_common_ops.h.
|
protected |
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.
This overload is used in multithreaded scenarios, where it is required to provide seperate instances of XMSS_Hash to each thread.
| [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. |
| [in] | hash | Instance of XMSS_Hash, that may only be used by the thead executing create_l_tree. |
Definition at line 46 of file xmss_common_ops.cpp.
References Botan::XMSS_Address::get_tree_height(), Botan::XMSS_Parameters::len(), m_xmss_params, randomize_tree_hash(), Botan::XMSS_Address::set_tree_height(), and Botan::XMSS_Address::set_tree_index().
Referenced by create_l_tree().
|
inlineprotected |
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 112 of file xmss_common_ops.h.
References create_l_tree(), and m_hash.
|
protected |
Algorithm 7: "RAND_HASH"
Generates a randomized hash.
This overload is used in multithreaded scenarios, where it is required to provide seperate instances of XMSS_Hash to each thread.
| [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. |
| [in] | hash | Instance of XMSS_Hash, that may only by the thead executing generate_public_key. |
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, 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 create_l_tree(), randomize_tree_hash(), and Botan::XMSS_PrivateKey::tree_hash().
|
inlineprotected |
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 69 of file xmss_common_ops.h.
References m_hash, and randomize_tree_hash().
|
protected |
Definition at line 122 of file xmss_common_ops.h.
Referenced by create_l_tree(), randomize_tree_hash(), Botan::XMSS_Signature_Operation::sign(), Botan::XMSS_PrivateKey::tree_hash(), and Botan::XMSS_Signature_Operation::update().
|
protected |
Definition at line 121 of file xmss_common_ops.h.
Referenced by create_l_tree(), randomize_tree_hash(), and Botan::XMSS_Signature_Operation::signature_length().
1.8.9.1