Botan 3.12.0
Crypto and TLS for C&
Botan::XMSS_WOTS_PublicKey Class Reference

#include <xmss_wots.h>

Inheritance diagram for Botan::XMSS_WOTS_PublicKey:
Botan::XMSS_WOTS_Base

Public Member Functions

const wots_keysig_tkey_data () const
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters params, std::span< const uint8_t > public_seed, const XMSS_WOTS_PrivateKey &private_key, XMSS_Address adrs, XMSS_Hash &hash)
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters params, std::span< const uint8_t > public_seed, wots_keysig_t signature, const secure_vector< uint8_t > &msg, XMSS_Address adrs, XMSS_Hash &hash)

Protected Attributes

wots_keysig_t m_key_data
XMSS_WOTS_Parameters m_params

Detailed Description

A Winternitz One Time Signature public key for use with Extended Hash-Based Signatures.

Definition at line 42 of file xmss_wots.h.

Constructor & Destructor Documentation

◆ XMSS_WOTS_PublicKey() [1/2]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters params,
std::span< const uint8_t > public_seed,
const XMSS_WOTS_PrivateKey & private_key,
XMSS_Address adrs,
XMSS_Hash & hash )

Algorithm 4: "WOTS_genPK" Initializes a Winternitz One Time Signature+ (WOTS+) Public Key's key data, with passed-in private key data using the WOTS chaining function.

This overload is used in multithreaded scenarios, where it is required to provide separate instances of XMSS_Hash to each thread.

Parameters
paramsThe WOTS parameters to use
public_seedThe public seed for the public key generation
private_keyThe private key to derive the public key from
adrsThe address of the key to retrieve.
HashesInstance of XMSS_Hash, that may only be used by the thread executing at.

Definition at line 123 of file xmss_wots.cpp.

127 :
128 XMSS_WOTS_Base(params, private_key.key_data()) {
129 for(size_t i = 0; i < m_params.len(); ++i) {
130 adrs.set_chain_address(static_cast<uint32_t>(i));
131 chain(m_params, m_key_data[i], 0, m_params.wots_parameter() - 1, adrs, public_seed, hash);
132 }
133}
XMSS_WOTS_Base(XMSS_WOTS_Parameters params)
Definition xmss_wots.h:26
wots_keysig_t m_key_data
Definition xmss_wots.h:35
XMSS_WOTS_Parameters m_params
Definition xmss_wots.h:34

References Botan::XMSS_WOTS_Base::key_data(), Botan::XMSS_WOTS_Base::m_key_data, Botan::XMSS_WOTS_Base::m_params, Botan::XMSS_Address::set_chain_address(), and Botan::XMSS_WOTS_Base::XMSS_WOTS_Base().

◆ XMSS_WOTS_PublicKey() [2/2]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters params,
std::span< const uint8_t > public_seed,
wots_keysig_t signature,
const secure_vector< uint8_t > & msg,
XMSS_Address adrs,
XMSS_Hash & hash )

Creates a XMSS_WOTS_PublicKey from a message and signature using Algorithm 6 WOTS_pkFromSig defined in the XMSS standard. This overload is used to verify a message using a public key.

Parameters
paramsThe WOTS parameters to use
public_seedThe public seed to derive the key with
signatureA WOTS signature for msg.
msgA message.
adrsThe address of the key to retrieve.
HashesInstance of XMSS_Hash, that may only be used by the thread executing at.

Definition at line 135 of file xmss_wots.cpp.

140 :
141 XMSS_WOTS_Base(params, std::move(signature)) {
142 const secure_vector<uint8_t> msg_digest = base_w_with_checksum(m_params, msg);
143
144 for(size_t i = 0; i < m_params.len(); i++) {
145 adrs.set_chain_address(static_cast<uint32_t>(i));
146 chain(m_params,
147 m_key_data[i],
148 msg_digest[i],
149 m_params.wots_parameter() - 1 - msg_digest[i],
150 adrs,
151 public_seed,
152 hash);
153 }
154}
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:68

References Botan::XMSS_WOTS_Base::m_key_data, Botan::XMSS_WOTS_Base::m_params, Botan::XMSS_Address::set_chain_address(), and Botan::XMSS_WOTS_Base::XMSS_WOTS_Base().

Member Function Documentation

◆ key_data()

const wots_keysig_t & Botan::XMSS_WOTS_Base::key_data ( ) const
inlineinherited

Member Data Documentation

◆ m_key_data

◆ m_params


The documentation for this class was generated from the following files: