Botan 3.6.1
Crypto and TLS for C&
|
#include <xmss_signature.h>
Classes | |
struct | TreeSignature |
Public Member Functions | |
std::vector< uint8_t > | bytes () const |
secure_vector< uint8_t > & | randomness () |
const secure_vector< uint8_t > & | randomness () const |
void | set_randomness (secure_vector< uint8_t > randomness) |
void | set_tree (XMSS_Signature::TreeSignature tree_sig) |
void | set_unused_leaf_idx (size_t idx) |
XMSS_Signature::TreeSignature & | tree () |
const XMSS_Signature::TreeSignature & | tree () const |
size_t | unused_leaf_index () const |
XMSS_Signature (size_t leaf_idx, secure_vector< uint8_t > randomness, XMSS_Signature::TreeSignature tree_sig) | |
XMSS_Signature (XMSS_Parameters::xmss_algorithm_t oid, std::span< const uint8_t > raw_sig) | |
Helper class for marshalling an XMSS signature
Definition at line 23 of file xmss_signature.h.
Botan::XMSS_Signature::XMSS_Signature | ( | XMSS_Parameters::xmss_algorithm_t | oid, |
std::span< const uint8_t > | raw_sig ) |
Creates a signature from an XMSS signature method and a uint8_t sequence representing a raw signature.
oid | XMSS signature method |
raw_sig | An XMSS signature serialized using XMSS_Signature::bytes(). |
Definition at line 13 of file xmss_signature.cpp.
References Botan::XMSS_Signature::TreeSignature::authentication_path, Botan::XMSS_Parameters::element_size(), Botan::XMSS_Parameters::len(), Botan::XMSS_Signature::TreeSignature::ots_signature, Botan::XMSS_Parameters::total_number_of_signatures(), and Botan::XMSS_Parameters::tree_height().
|
inline |
Creates an XMSS Signature from a leaf index used for signature generation, a random value and a tree signature.
leaf_idx | Leaf index used to generate the signature. |
randomness | A random value. |
tree_sig | A tree signature. |
Definition at line 50 of file xmss_signature.h.
std::vector< uint8_t > Botan::XMSS_Signature::bytes | ( | ) | const |
Generates a serialized representation of XMSS Signature by concatenating the following elements in order: 4-byte leaf index, n-bytes randomness, ots_signature, authentication path.
n is the element_size(), len equal to len(), h the tree height defined by the chosen XMSS signature method.
Definition at line 51 of file xmss_signature.cpp.
References tree().
|
inline |
Definition at line 62 of file xmss_signature.h.
|
inline |
Definition at line 55 of file xmss_signature.h.
Referenced by set_randomness().
|
inline |
Definition at line 64 of file xmss_signature.h.
References randomness().
|
inline |
Definition at line 68 of file xmss_signature.h.
|
inline |
Definition at line 60 of file xmss_signature.h.
|
inline |
Definition at line 66 of file xmss_signature.h.
|
inline |
|
inline |
Definition at line 53 of file xmss_signature.h.