Botan
2.1.0
Crypto and TLS for C++11
|
#include <xmss_wots_parameters.h>
Public Types | |
enum | ots_algorithm_t { WOTSP_SHA2_256_W16 = 0x01000001, WOTSP_SHA2_512_W16 = 0x02000002, WOTSP_SHAKE128_W16 = 0x03000003, WOTSP_SHAKE256_W16 = 0x04000004 } |
Public Member Functions | |
void | append_checksum (secure_vector< uint8_t > &data) |
secure_vector< uint8_t > | base_w (const secure_vector< uint8_t > &msg, size_t out_size) const |
secure_vector< uint8_t > | base_w (size_t value) const |
size_t | element_size () const |
size_t | estimated_strength () const |
const std::string & | hash_function_name () const |
size_t | len () const |
size_t | len_1 () const |
size_t | len_2 () const |
size_t | lg_w () const |
const std::string & | name () const |
ots_algorithm_t | oid () const |
bool | operator== (const XMSS_WOTS_Parameters &p) const |
size_t | wots_parameter () const |
XMSS_WOTS_Parameters (const std::string &algo_name) | |
XMSS_WOTS_Parameters (ots_algorithm_t ots_spec) | |
Static Public Member Functions | |
static ots_algorithm_t | xmss_wots_id_from_string (const std::string ¶m_set) |
Descibes a signature method for XMSS Winternitz One Time Signatures, 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 34 of file xmss_wots_parameters.h.
Enumerator | |
---|---|
WOTSP_SHA2_256_W16 | |
WOTSP_SHA2_512_W16 | |
WOTSP_SHAKE128_W16 | |
WOTSP_SHAKE256_W16 |
Definition at line 37 of file xmss_wots_parameters.h.
Botan::XMSS_WOTS_Parameters::XMSS_WOTS_Parameters | ( | const std::string & | algo_name | ) |
Definition at line 35 of file xmss_wots_parameters.cpp.
Botan::XMSS_WOTS_Parameters::XMSS_WOTS_Parameters | ( | ots_algorithm_t | ots_spec | ) |
Definition at line 39 of file xmss_wots_parameters.cpp.
References BOTAN_ASSERT, element_size(), wots_parameter(), WOTSP_SHA2_256_W16, WOTSP_SHA2_512_W16, WOTSP_SHAKE128_W16, and WOTSP_SHAKE256_W16.
void Botan::XMSS_WOTS_Parameters::append_checksum | ( | secure_vector< uint8_t > & | data | ) |
Definition at line 124 of file xmss_wots_parameters.cpp.
References base_w(), and wots_parameter().
Referenced by Botan::XMSS_WOTS_PrivateKey::sign().
secure_vector< uint8_t > Botan::XMSS_WOTS_Parameters::base_w | ( | const secure_vector< uint8_t > & | msg, |
size_t | out_size | ||
) | const |
Algorithm 1: convert input string to base.
msg | Input string (referred to as X in [1]). |
out_size | size of message in base w. |
Definition at line 91 of file xmss_wots_parameters.cpp.
Referenced by append_checksum(), base_w(), and Botan::XMSS_WOTS_PrivateKey::sign().
secure_vector< uint8_t > Botan::XMSS_WOTS_Parameters::base_w | ( | size_t | value | ) | const |
Definition at line 113 of file xmss_wots_parameters.cpp.
References base_w(), and Botan::XMSS_Tools::concat().
|
inline |
Retrieves the uniform length of a message, and the size of each node. This correlates to XMSS parameter "n" defined in [1].
Definition at line 87 of file xmss_wots_parameters.h.
Referenced by Botan::XMSS_WOTS_Verification_Operation::is_valid_signature(), Botan::XMSS_WOTS_Signature_Operation::sign(), Botan::XMSS_PrivateKey::XMSS_PrivateKey(), XMSS_WOTS_Parameters(), and Botan::XMSS_WOTS_Signature_Operation::XMSS_WOTS_Signature_Operation().
|
inline |
Definition at line 107 of file xmss_wots_parameters.h.
|
inline |
Definition at line 75 of file xmss_wots_parameters.h.
|
inline |
Definition at line 97 of file xmss_wots_parameters.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key(), Botan::XMSS_WOTS_Verification_Operation::is_valid_signature(), Botan::XMSS_WOTS_Signature_Operation::sign(), and Botan::XMSS_WOTS_PrivateKey::sign().
|
inline |
Definition at line 99 of file xmss_wots_parameters.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::sign().
|
inline |
Definition at line 101 of file xmss_wots_parameters.h.
|
inline |
Definition at line 103 of file xmss_wots_parameters.h.
|
inline |
Definition at line 67 of file xmss_wots_parameters.h.
|
inline |
Definition at line 105 of file xmss_wots_parameters.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key(), Botan::XMSS_WOTS_Verification_Operation::is_valid_signature(), and Botan::XMSS_PrivateKey::tree_hash().
|
inline |
Definition at line 109 of file xmss_wots_parameters.h.
|
inline |
The Winternitz parameter.
Definition at line 95 of file xmss_wots_parameters.h.
Referenced by append_checksum(), Botan::XMSS_WOTS_Common_Ops::chain(), Botan::XMSS_WOTS_PublicKey::chain(), Botan::XMSS_WOTS_PrivateKey::generate_public_key(), and XMSS_WOTS_Parameters().
|
static |
Definition at line 22 of file xmss_wots_parameters.cpp.
References WOTSP_SHA2_256_W16, WOTSP_SHA2_512_W16, WOTSP_SHAKE128_W16, and WOTSP_SHAKE256_W16.