Botan 3.6.1
Crypto and TLS for C&
|
The LM-OTS parameters. More...
#include <lm_ots.h>
Public Member Functions | |
LMOTS_Algorithm_Type | algorithm_type () const |
Returns the LM-OTS algorithm type. | |
uint8_t | coef_max () const |
The maximum the winternitz coefficients can have. | |
std::unique_ptr< HashFunction > | hash () const |
Construct a new hash instance for the OTS instance. | |
const std::string & | hash_name () const |
Name of the hash function to use. | |
uint8_t | ls () const |
The number of left-shift bits used in the checksum function Cksm. | |
size_t | n () const |
The number of bytes of the output of the hash function. | |
uint16_t | p () const |
The number of n-byte string elements that make up the LM-OTS signature. | |
uint8_t | w () const |
The width (in bits) of the Winternitz coefficients. | |
Static Public Member Functions | |
static LMOTS_Params | create_or_throw (LMOTS_Algorithm_Type type) |
Create the LM-OTS parameters from a known algorithm type. | |
static LMOTS_Params | create_or_throw (std::string_view hash_name, uint8_t w) |
Create the LM-OTS parameters from a hash function and width. | |
|
inline |
|
inline |
The maximum the winternitz coefficients can have.
Definition at line 135 of file lm_ots.h.
Referenced by Botan::LMOTS_Public_Key::LMOTS_Public_Key().
|
static |
Create the LM-OTS parameters from a known algorithm type.
Decoding_Error | If the algorithm type is unknown |
Definition at line 100 of file lm_ots.cpp.
References hash_name(), Botan::RESERVED, Botan::SHA256_N24_W1, Botan::SHA256_N24_W2, Botan::SHA256_N24_W4, Botan::SHA256_N24_W8, Botan::SHA256_N32_W1, Botan::SHA256_N32_W2, Botan::SHA256_N32_W4, Botan::SHA256_N32_W8, Botan::SHAKE_N24_W1, Botan::SHAKE_N24_W2, Botan::SHAKE_N24_W4, Botan::SHAKE_N24_W8, Botan::SHAKE_N32_W1, Botan::SHAKE_N32_W2, Botan::SHAKE_N32_W4, Botan::SHAKE_N32_W8, and w().
Referenced by Botan::HSS_LMS_PrivateKeyInternal::from_bytes_or_throw(), Botan::LMOTS_Signature::from_bytes_or_throw(), Botan::LMS_PublicKey::from_bytes_or_throw(), Botan::LMS_Signature::from_bytes_or_throw(), Botan::HSS_LMS_Params::HSS_LMS_Params(), and Botan::lmots_compute_pubkey_from_sig().
|
static |
Create the LM-OTS parameters from a hash function and width.
hash_name | tha name of the hash function to use. |
w | the width (in bits) of the Winternitz coefficients. |
Decoding_Error | If the algorithm type is unknown |
Definition at line 144 of file lm_ots.cpp.
References hash(), hash_name(), Botan::SHA256_N24_W1, Botan::SHA256_N24_W2, Botan::SHA256_N24_W4, Botan::SHA256_N24_W8, Botan::SHA256_N32_W1, Botan::SHA256_N32_W2, Botan::SHA256_N32_W4, Botan::SHA256_N32_W8, Botan::SHAKE_N24_W1, Botan::SHAKE_N24_W2, Botan::SHAKE_N24_W4, Botan::SHAKE_N24_W8, Botan::SHAKE_N32_W1, Botan::SHAKE_N32_W2, Botan::SHAKE_N32_W4, Botan::SHAKE_N32_W8, and w().
|
inline |
Construct a new hash instance for the OTS instance.
Definition at line 155 of file lm_ots.h.
Referenced by create_or_throw(), Botan::LMOTS_Private_Key::LMOTS_Private_Key(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and Botan::LMOTS_Private_Key::sign().
|
inline |
Name of the hash function to use.
Definition at line 150 of file lm_ots.h.
Referenced by create_or_throw(), create_or_throw(), Botan::LMS_PublicKey::from_bytes_or_throw(), and Botan::HSS_LMS_PublicKeyInternal::verify_signature().
|
inline |
|
inline |
The number of bytes of the output of the hash function.
Definition at line 125 of file lm_ots.h.
Referenced by Botan::LMOTS_Signature::from_bytes_or_throw(), Botan::LMOTS_Public_Key::LMOTS_Public_Key(), and Botan::LMOTS_Signature::size().
|
inline |
The number of n-byte string elements that make up the LM-OTS signature.
Definition at line 140 of file lm_ots.h.
Referenced by Botan::LMOTS_Signature::from_bytes_or_throw(), Botan::LMOTS_Private_Key::LMOTS_Private_Key(), Botan::LMOTS_Private_Key::sign(), and Botan::LMOTS_Signature::size().
|
inline |
The width (in bits) of the Winternitz coefficients.
Definition at line 130 of file lm_ots.h.
Referenced by create_or_throw(), and create_or_throw().