Botan 3.6.1
Crypto and TLS for C&
|
#include <xmss_parameters.h>
Public Types | |
enum | ots_algorithm_t { WOTSP_SHA2_256 = 0x00000001 , WOTSP_SHA2_512 = 0x00000002 , WOTSP_SHAKE_256 = 0x00000003 , WOTSP_SHAKE_512 = 0x00000004 , WOTSP_SHA2_192 = 0x00000005 , WOTSP_SHAKE_256_256 = 0x00000006 , WOTSP_SHAKE_256_192 = 0x00000007 } |
Public Member Functions | |
void | append_checksum (secure_vector< uint8_t > &data) const |
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 |
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 (ots_algorithm_t ots_spec) | |
XMSS_WOTS_Parameters (std::string_view algo_name) | |
Static Public Member Functions | |
static ots_algorithm_t | xmss_wots_id_from_string (std::string_view param_set) |
Descibes a signature method for XMSS Winternitz One Time Signatures, as defined in: [1] XMSS: Extended Hash-Based Signatures, Request for Comments: 8391 Release: May 2018. https://datatracker.ietf.org/doc/rfc8391/ [2] Recommendation for Stateful Hash-Based Signature Schemes NIST Special Publication 800-208 Release: October 2020. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-208.pdf
Definition at line 31 of file xmss_parameters.h.
Enumerator | |
---|---|
WOTSP_SHA2_256 | |
WOTSP_SHA2_512 | |
WOTSP_SHAKE_256 | |
WOTSP_SHAKE_512 | |
WOTSP_SHA2_192 | |
WOTSP_SHAKE_256_256 | |
WOTSP_SHAKE_256_192 |
Definition at line 33 of file xmss_parameters.h.
|
explicit |
Definition at line 50 of file xmss_wots_parameters.cpp.
Botan::XMSS_WOTS_Parameters::XMSS_WOTS_Parameters | ( | ots_algorithm_t | ots_spec | ) |
Definition at line 53 of file xmss_wots_parameters.cpp.
References BOTAN_ASSERT, element_size(), oid(), wots_parameter(), WOTSP_SHA2_192, WOTSP_SHA2_256, WOTSP_SHA2_512, WOTSP_SHAKE_256, WOTSP_SHAKE_256_192, WOTSP_SHAKE_256_256, and WOTSP_SHAKE_512.
void Botan::XMSS_WOTS_Parameters::append_checksum | ( | secure_vector< uint8_t > & | data | ) | const |
Definition at line 151 of file xmss_wots_parameters.cpp.
References base_w(), and wots_parameter().
Referenced by Botan::XMSS_WOTS_PrivateKey::sign(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
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 123 of file xmss_wots_parameters.cpp.
Referenced by append_checksum(), base_w(), Botan::XMSS_WOTS_PrivateKey::sign(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
secure_vector< uint8_t > Botan::XMSS_WOTS_Parameters::base_w | ( | size_t | value | ) | const |
Definition at line 143 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 80 of file xmss_parameters.h.
Referenced by XMSS_WOTS_Parameters().
|
inline |
Definition at line 100 of file xmss_parameters.h.
|
inline |
Definition at line 90 of file xmss_parameters.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::sign(), Botan::XMSS_WOTS_PrivateKey::XMSS_WOTS_PrivateKey(), Botan::XMSS_WOTS_PrivateKey::XMSS_WOTS_PrivateKey(), Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
|
inline |
Definition at line 92 of file xmss_parameters.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::sign(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
|
inline |
Definition at line 94 of file xmss_parameters.h.
|
inline |
Definition at line 96 of file xmss_parameters.h.
|
inline |
Definition at line 71 of file xmss_parameters.h.
|
inline |
Definition at line 98 of file xmss_parameters.h.
Referenced by XMSS_WOTS_Parameters().
|
inline |
Definition at line 102 of file xmss_parameters.h.
|
inline |
The Winternitz parameter.
Definition at line 88 of file xmss_parameters.h.
Referenced by append_checksum(), XMSS_WOTS_Parameters(), Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey(), and Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey().
|
static |
Definition at line 24 of file xmss_wots_parameters.cpp.
References Botan::fmt(), WOTSP_SHA2_192, WOTSP_SHA2_256, WOTSP_SHA2_512, WOTSP_SHAKE_256, WOTSP_SHAKE_256_192, WOTSP_SHAKE_256_256, and WOTSP_SHAKE_512.