Botan 2.19.3
Crypto and TLS for C&
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Botan::XMSS_WOTS_PublicKey Class Reference

#include <xmss_wots.h>

Inheritance diagram for Botan::XMSS_WOTS_PublicKey:
Botan::Public_Key Botan::XMSS_WOTS_PrivateKey

Classes

class  TreeSignature
 

Public Member Functions

std::string algo_name () const override
 
AlgorithmIdentifier algorithm_identifier () const override
 
bool check_key (RandomNumberGenerator &, bool) const override
 
virtual std::unique_ptr< PK_Ops::Encryptioncreate_encryption_op (RandomNumberGenerator &rng, const std::string &params, const std::string &provider) const
 
virtual std::unique_ptr< PK_Ops::KEM_Encryptioncreate_kem_encryption_op (RandomNumberGenerator &rng, const std::string &params, const std::string &provider) const
 
virtual std::unique_ptr< PK_Ops::Verificationcreate_verification_op (const std::string &params, const std::string &provider) const
 
virtual Signature_Format default_x509_signature_format () const
 
size_t estimated_strength () const override
 
std::string fingerprint_public (const std::string &alg="SHA-256") const
 
virtual OID get_oid () const
 
wots_keysig_tkey_data ()
 
const wots_keysig_tkey_data () const
 
size_t key_length () const override
 
virtual size_t message_part_size () const
 
virtual size_t message_parts () const
 
 operator const wots_keysig_t & () const
 
 operator wots_keysig_t & ()
 
bool operator!= (const XMSS_WOTS_PublicKey &key)
 
bool operator== (const XMSS_WOTS_PublicKey &key)
 
secure_vector< uint8_t > & operator[] (size_t i)
 
const secure_vector< uint8_t > & operator[] (size_t i) const
 
std::vector< uint8_t > public_key_bits () const override
 
secure_vector< uint8_t > & public_seed ()
 
const secure_vector< uint8_t > & public_seed () const
 
void set_key_data (const wots_keysig_t &key_data)
 
void set_key_data (wots_keysig_t &&key_data)
 
void set_public_seed (const secure_vector< uint8_t > &public_seed)
 
void set_public_seed (secure_vector< uint8_t > &&public_seed)
 
std::vector< uint8_t > subject_public_key () const
 
const XMSS_WOTS_Parameterswots_parameters () const
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid)
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid, const secure_vector< uint8_t > &msg, const wots_keysig_t &sig, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed)
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid, const secure_vector< uint8_t > &public_seed, const wots_keysig_t &key)
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid, RandomNumberGenerator &rng)
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid, secure_vector< uint8_t > &&public_seed, wots_keysig_t &&key)
 
 XMSS_WOTS_PublicKey (XMSS_WOTS_Parameters::ots_algorithm_t oid, secure_vector< uint8_t > public_seed)
 

Protected Member Functions

void chain (secure_vector< uint8_t > &x, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed)
 
void chain (secure_vector< uint8_t > &x, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed, XMSS_Hash &hash)
 

Protected Attributes

XMSS_Hash m_hash
 
wots_keysig_t m_key
 
secure_vector< uint8_t > m_public_seed
 
XMSS_WOTS_Parameters m_wots_params
 

Detailed Description

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

Definition at line 134 of file xmss_wots.h.

Constructor & Destructor Documentation

◆ XMSS_WOTS_PublicKey() [1/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid)
inline

Creates a XMSS_WOTS_PublicKey for the signature method identified by oid. The public seed for this key will be initialized with a uniformly random n-byte value, where "n" is the element size of the selected signature method.

Parameters
oidIdentifier for the selected signature method.

Definition at line 186 of file xmss_wots.h.

187 : m_wots_params(oid),
const std::string & hash_function_name() const
Definition xmss_wots.h:73
XMSS_WOTS_Parameters m_wots_params
Definition xmss_wots.h:427

◆ XMSS_WOTS_PublicKey() [2/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid,
RandomNumberGenerator rng 
)
inline

Creates a XMSS_WOTS_PublicKey for the signature method identified by oid. The public seed for this key will be initialized with a uniformly random n-byte value, where "n" is the element size of the selected signature method.

Parameters
oidIdentifier for the selected signature method.
rngA random number generate used to generate the public seed.

Definition at line 199 of file xmss_wots.h.

201 : m_wots_params(oid),
203 m_public_seed(rng.random_vec(m_wots_params.element_size())) {}
size_t element_size() const
Definition xmss_wots.h:85
secure_vector< uint8_t > m_public_seed
Definition xmss_wots.h:430

◆ XMSS_WOTS_PublicKey() [3/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid,
secure_vector< uint8_t >  public_seed 
)
inline

Creates a XMSS_WOTS_PrivateKey for the signature method identified by oid, with a precomputed public seed.

Parameters
oidIdentifier for the selected signature method.
public_seedA precomputed public seed of n-bytes length.

Definition at line 212 of file xmss_wots.h.

214 : m_wots_params(oid),
const secure_vector< uint8_t > & public_seed() const
Definition xmss_wots.h:303

◆ XMSS_WOTS_PublicKey() [4/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid,
secure_vector< uint8_t > &&  public_seed,
wots_keysig_t &&  key 
)
inline

Creates a XMSS_WOTS_PublicKey for the signature method identified by oid. The public seed will be initialized with a precomputed seed and and precomputed key data which should be derived from a XMSS_WOTS_PrivateKey.

Parameters
oidIdent:s/ifier for the selected signature methods.
public_seedA precomputed public seed of n-bytes length.
keyPrecomputed raw key data of the XMSS_WOTS_PublicKey.

Definition at line 228 of file xmss_wots.h.

231 : m_wots_params(oid),
233 m_key(std::move(key)),
234 m_public_seed(std::move(public_seed))
235 {}

◆ XMSS_WOTS_PublicKey() [5/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid,
const secure_vector< uint8_t > &  public_seed,
const wots_keysig_t key 
)
inline

Creates a XMSS_WOTS_PublicKey for the signature method identified by oid. The public seed will be initialized with a precomputed seed and and precomputed key data which should be derived from a XMSS_WOTS_PrivateKey.

Parameters
oidIdentifier for the selected signature methods.
public_seedA precomputed public seed of n-bytes length.
keyPrecomputed raw key data of the XMSS_WOTS_PublicKey.

Definition at line 247 of file xmss_wots.h.

◆ XMSS_WOTS_PublicKey() [6/6]

Botan::XMSS_WOTS_PublicKey::XMSS_WOTS_PublicKey ( XMSS_WOTS_Parameters::ots_algorithm_t  oid,
const secure_vector< uint8_t > &  msg,
const wots_keysig_t sig,
XMSS_Address adrs,
const secure_vector< uint8_t > &  public_seed 
)
inline

Creates a XMSS_WOTS_PublicKey form 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
oidWOTSP algorithm identifier.
msgA message.
sigA WOTS signature for msg.
adrsAn XMSS_Address.
public_seedThe public public_seed.

Definition at line 267 of file xmss_wots.h.

272 : m_wots_params(oid),
274 m_key(pub_key_from_signature(msg,
275 sig,
276 adrs,
277 public_seed)),
279 {}

Member Function Documentation

◆ algo_name()

std::string Botan::XMSS_WOTS_PublicKey::algo_name ( ) const
inlineoverridevirtual

Get the name of the underlying public key scheme.

Returns
name of the public key scheme

Implements Botan::Public_Key.

Definition at line 336 of file xmss_wots.h.

337 {
338 return m_wots_params.name();
339 }
const std::string & name() const
Definition xmss_wots.h:65

References m_wots_params, and Botan::XMSS_WOTS_Parameters::name().

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::algo_name().

◆ algorithm_identifier()

AlgorithmIdentifier Botan::XMSS_WOTS_PublicKey::algorithm_identifier ( ) const
inlineoverridevirtual
Returns
X.509 AlgorithmIdentifier for this key

Implements Botan::Public_Key.

Definition at line 341 of file xmss_wots.h.

342 {
343 throw Not_Implemented("No AlgorithmIdentifier available for XMSS-WOTS.");
344 }

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::algorithm_identifier().

◆ chain() [1/2]

void Botan::XMSS_WOTS_PublicKey::chain ( secure_vector< uint8_t > &  x,
size_t  start_idx,
size_t  steps,
XMSS_Address adrs,
const secure_vector< uint8_t > &  public_seed 
)
inlineprotected

Algorithm 2: Chaining Function.

Takes an n-byte input string and transforms it into a the function result iterating the cryptographic hash function "F" steps times on the input x using the outputs of the PRNG "G".

Parameters
[out]xAn n-byte input string, that will be transformed into the chaining function result.
start_idxThe start index.
stepsA number of steps.
adrsAn OTS Hash Address.
public_seedA public seed.

Definition at line 418 of file xmss_wots.h.

423 {
424 chain(x, start_idx, steps, adrs, public_seed, m_hash);
425 }
void chain(secure_vector< uint8_t > &x, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &public_seed, XMSS_Hash &hash)

References chain(), m_hash, and public_seed().

◆ chain() [2/2]

void Botan::XMSS_WOTS_PublicKey::chain ( secure_vector< uint8_t > &  x,
size_t  start_idx,
size_t  steps,
XMSS_Address adrs,
const secure_vector< uint8_t > &  public_seed,
XMSS_Hash hash 
)
protected

Algorithm 2: Chaining Function.

Takes an n-byte input string and transforms it into a the function result iterating the cryptographic hash function "F" steps times on the input x using the outputs of the PRNG "G".

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

Parameters
[out]xAn n-byte input string, that will be transformed into the chaining function result.
start_idxThe start index.
stepsA number of steps.
adrsAn OTS Hash Address.
public_seedA public seed.
hashInstance of XMSS_Hash, that may only by the thead executing chain.

Definition at line 17 of file xmss_wots_publickey.cpp.

23 {
24 secure_vector<uint8_t> prf_output(hash.output_length());
25
26 for(size_t i = start_idx;
27 i < (start_idx + steps) && i < m_wots_params.wots_parameter();
28 i++)
29 {
30 adrs.set_hash_address(static_cast<uint32_t>(i));
31
32 //Calculate tmp XOR bitmask
33 adrs.set_key_mask_mode(XMSS_Address::Key_Mask::Mask_Mode);
34 hash.prf(prf_output, seed, adrs.bytes());
35 xor_buf(result, prf_output, result.size());
36
37 // Calculate key
38 adrs.set_key_mask_mode(XMSS_Address::Key_Mask::Key_Mode);
39
40 //Calculate f(key, tmp XOR bitmask)
41 hash.prf(prf_output, seed, adrs.bytes());
42 hash.f(result, prf_output, result);
43 }
44 }
size_t wots_parameter() const
Definition xmss_wots.h:93
void xor_buf(uint8_t out[], const uint8_t in[], size_t length)
Definition mem_ops.h:262
MechanismType hash

References Botan::XMSS_Address::bytes(), hash, Botan::XMSS_Address::Key_Mode, m_wots_params, Botan::XMSS_Address::Mask_Mode, Botan::XMSS_Address::set_hash_address(), Botan::XMSS_Address::set_key_mask_mode(), Botan::XMSS_WOTS_Parameters::wots_parameter(), and Botan::xor_buf().

Referenced by chain(), Botan::XMSS_WOTS_PrivateKey::generate_public_key(), and Botan::XMSS_WOTS_PrivateKey::sign().

◆ check_key()

bool Botan::XMSS_WOTS_PublicKey::check_key ( RandomNumberGenerator rng,
bool  strong 
) const
inlineoverridevirtual

Test the key values for consistency.

Parameters
rngrng to use
strongwhether to perform strong and lengthy version of the test
Returns
true if the test is passed

Implements Botan::Public_Key.

Definition at line 346 of file xmss_wots.h.

347 {
348 return true;
349 }

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::check_key().

◆ create_encryption_op()

std::unique_ptr< PK_Ops::Encryption > Botan::Public_Key::create_encryption_op ( RandomNumberGenerator rng,
const std::string &  params,
const std::string &  provider 
) const
virtualinherited

This is an internal library function exposed on key types. In almost all cases applications should use wrappers in pubkey.h

Return an encryption operation for this key/params or throw

Parameters
rnga random number generator. The PK_Op may maintain a reference to the RNG and use it many times. The rng must outlive any operations which reference it.
paramsadditional parameters
providerthe provider to use

Reimplemented in Botan::ElGamal_PublicKey, Botan::RSA_PublicKey, and Botan::SM2_PublicKey.

Definition at line 91 of file pk_keys.cpp.

94 {
95 throw Lookup_Error(algo_name() + " does not support encryption");
96 }
virtual std::string algo_name() const =0

References Botan::Public_Key::algo_name().

Referenced by Botan::PK_Encryptor_EME::PK_Encryptor_EME().

◆ create_kem_encryption_op()

std::unique_ptr< PK_Ops::KEM_Encryption > Botan::Public_Key::create_kem_encryption_op ( RandomNumberGenerator rng,
const std::string &  params,
const std::string &  provider 
) const
virtualinherited

This is an internal library function exposed on key types. In almost all cases applications should use wrappers in pubkey.h

Return a KEM encryption operation for this key/params or throw

Parameters
rnga random number generator. The PK_Op may maintain a reference to the RNG and use it many times. The rng must outlive any operations which reference it.
paramsadditional parameters
providerthe provider to use

Reimplemented in Botan::McEliece_PublicKey, and Botan::RSA_PublicKey.

Definition at line 99 of file pk_keys.cpp.

102 {
103 throw Lookup_Error(algo_name() + " does not support KEM encryption");
104 }

References Botan::Public_Key::algo_name().

Referenced by Botan::PK_KEM_Encryptor::PK_KEM_Encryptor().

◆ create_verification_op()

std::unique_ptr< PK_Ops::Verification > Botan::Public_Key::create_verification_op ( const std::string &  params,
const std::string &  provider 
) const
virtualinherited

This is an internal library function exposed on key types. In almost all cases applications should use wrappers in pubkey.h

Return a verification operation for this key/params or throw

Parameters
paramsadditional parameters
providerthe provider to use

Reimplemented in Botan::XMSS_PublicKey, Botan::DSA_PublicKey, Botan::ECDSA_PublicKey, Botan::ECGDSA_PublicKey, Botan::ECKCDSA_PublicKey, Botan::Ed25519_PublicKey, Botan::GOST_3410_PublicKey, Botan::RSA_PublicKey, Botan::SM2_PublicKey, and Botan::XMSS_WOTS_Addressed_PublicKey.

Definition at line 107 of file pk_keys.cpp.

109 {
110 throw Lookup_Error(algo_name() + " does not support verification");
111 }

References Botan::Public_Key::algo_name().

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::create_verification_op(), and Botan::PK_Verifier::PK_Verifier().

◆ default_x509_signature_format()

virtual Signature_Format Botan::Public_Key::default_x509_signature_format ( ) const
inlinevirtualinherited

Reimplemented in Botan::GOST_3410_PublicKey.

Definition at line 125 of file pk_keys.h.

126 {
127 return (this->message_parts() >= 2) ? DER_SEQUENCE : IEEE_1363;
128 }
virtual size_t message_parts() const
Definition pk_keys.h:112
@ DER_SEQUENCE
Definition pk_keys.h:23
@ IEEE_1363
Definition pk_keys.h:23

References Botan::DER_SEQUENCE, and Botan::IEEE_1363.

Referenced by Botan::X509_Object::choose_sig_format(), and Botan::X509_Object::verify_signature().

◆ estimated_strength()

size_t Botan::XMSS_WOTS_PublicKey::estimated_strength ( ) const
inlineoverridevirtual

Return the estimated strength of the underlying key against the best currently known attack. Note that this ignores anything but pure attacks against the key itself and do not take into account padding schemes, usage mistakes, etc which might reduce the strength. However it does suffice to provide an upper bound.

Returns
estimated strength in bits

Implements Botan::Public_Key.

Definition at line 351 of file xmss_wots.h.

352 {
354 }
size_t estimated_strength() const
Definition xmss_wots.h:105

References Botan::XMSS_WOTS_Parameters::estimated_strength(), and m_wots_params.

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::estimated_strength(), and Botan::XMSS_WOTS_Addressed_PublicKey::key_length().

◆ fingerprint_public()

std::string Botan::Public_Key::fingerprint_public ( const std::string &  alg = "SHA-256") const
inherited
Returns
Hash of the subject public key

Definition at line 77 of file pk_keys.cpp.

78 {
80 }
std::vector< uint8_t > subject_public_key() const
Definition pk_keys.cpp:38
std::string create_hex_fingerprint(const uint8_t bits[], size_t bits_len, const std::string &hash_name)
Definition pk_keys.cpp:17
AlgorithmIdentifier hash_algo
Definition x509_obj.cpp:22

References Botan::create_hex_fingerprint(), hash_algo, and Botan::Public_Key::subject_public_key().

◆ get_oid()

OID Botan::Public_Key::get_oid ( ) const
virtualinherited

◆ key_data() [1/2]

wots_keysig_t & Botan::XMSS_WOTS_PublicKey::key_data ( )
inline

Definition at line 319 of file xmss_wots.h.

319{ return m_key; }

References m_key.

◆ key_data() [2/2]

const wots_keysig_t & Botan::XMSS_WOTS_PublicKey::key_data ( ) const
inline

Definition at line 317 of file xmss_wots.h.

317{ return m_key; }

References m_key.

Referenced by set_key_data(), and set_key_data().

◆ key_length()

size_t Botan::XMSS_WOTS_PublicKey::key_length ( ) const
inlineoverridevirtual

Return an integer value best approximating the length of the primary security parameter. For example for RSA this will be the size of the modulus, for ECDSA the size of the ECC group, and for McEliece the size of the code will be returned.

Implements Botan::Public_Key.

Definition at line 356 of file xmss_wots.h.

357 {
359 }

References Botan::XMSS_WOTS_Parameters::estimated_strength(), and m_wots_params.

◆ message_part_size()

virtual size_t Botan::Public_Key::message_part_size ( ) const
inlinevirtualinherited

Returns how large each of the message parts refered to by message_parts() is

This function is public but applications should have few reasons to ever call this.

Returns
size of the message parts in bits

Reimplemented in Botan::DSA_PublicKey, Botan::ECDSA_PublicKey, Botan::ECGDSA_PublicKey, Botan::ECKCDSA_PublicKey, Botan::GOST_3410_PublicKey, and Botan::SM2_PublicKey.

Definition at line 123 of file pk_keys.h.

123{ return 0; }

Referenced by Botan::PK_Signer::PK_Signer(), and Botan::PK_Verifier::PK_Verifier().

◆ message_parts()

virtual size_t Botan::Public_Key::message_parts ( ) const
inlinevirtualinherited

Returns more than 1 if the output of this algorithm (ciphertext, signature) should be treated as more than one value. This is used for algorithms like DSA and ECDSA, where the (r,s) output pair can be encoded as either a plain binary list or a TLV tagged DER encoding depending on the protocol.

This function is public but applications should have few reasons to ever call this.

Returns
number of message parts

Reimplemented in Botan::DSA_PublicKey, Botan::ECDSA_PublicKey, Botan::ECGDSA_PublicKey, Botan::ECKCDSA_PublicKey, Botan::GOST_3410_PublicKey, and Botan::SM2_PublicKey.

Definition at line 112 of file pk_keys.h.

112{ return 1; }

Referenced by Botan::PK_Signer::PK_Signer(), and Botan::PK_Verifier::PK_Verifier().

◆ operator const wots_keysig_t &()

Botan::XMSS_WOTS_PublicKey::operator const wots_keysig_t & ( ) const
inline

Convert the key into the raw key data. The key becomes a length len vector of n-byte elements.

Definition at line 295 of file xmss_wots.h.

295{ return m_key; }

References m_key.

◆ operator wots_keysig_t &()

Botan::XMSS_WOTS_PublicKey::operator wots_keysig_t & ( )
inline

Convert the key into the raw key data. The key becomes a length len vector of n-byte elements.

Definition at line 301 of file xmss_wots.h.

301{ return m_key; }

References m_key.

◆ operator!=()

bool Botan::XMSS_WOTS_PublicKey::operator!= ( const XMSS_WOTS_PublicKey key)
inline

Definition at line 371 of file xmss_wots.h.

372 {
373 return !(*this == key);
374 }

◆ operator==()

bool Botan::XMSS_WOTS_PublicKey::operator== ( const XMSS_WOTS_PublicKey key)
inline

Definition at line 366 of file xmss_wots.h.

367 {
368 return m_key == key.m_key;
369 }

References m_key.

◆ operator[]() [1/2]

secure_vector< uint8_t > & Botan::XMSS_WOTS_PublicKey::operator[] ( size_t  i)
inline

Definition at line 289 of file xmss_wots.h.

289{ return m_key[i]; }

References m_key.

◆ operator[]() [2/2]

const secure_vector< uint8_t > & Botan::XMSS_WOTS_PublicKey::operator[] ( size_t  i) const
inline

Retrieves the i-th element out of the length len chain of n-byte elements contained in the public key.

Parameters
iindex of the element.
Returns
n-byte element addressed by i.

Definition at line 288 of file xmss_wots.h.

288{ return m_key[i]; }

References m_key.

◆ public_key_bits()

std::vector< uint8_t > Botan::XMSS_WOTS_PublicKey::public_key_bits ( ) const
inlineoverridevirtual
Returns
BER encoded public key bits

Implements Botan::Public_Key.

Definition at line 361 of file xmss_wots.h.

362 {
363 throw Not_Implemented("No key format defined for XMSS-WOTS");
364 }

Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::public_key_bits().

◆ public_seed() [1/2]

secure_vector< uint8_t > & Botan::XMSS_WOTS_PublicKey::public_seed ( )
inline

Definition at line 305 of file xmss_wots.h.

305{ return m_public_seed; }

References m_public_seed.

◆ public_seed() [2/2]

const secure_vector< uint8_t > & Botan::XMSS_WOTS_PublicKey::public_seed ( ) const
inline

◆ set_key_data() [1/2]

void Botan::XMSS_WOTS_PublicKey::set_key_data ( const wots_keysig_t key_data)
inline

◆ set_key_data() [2/2]

void Botan::XMSS_WOTS_PublicKey::set_key_data ( wots_keysig_t &&  key_data)
inline

Definition at line 326 of file xmss_wots.h.

327 {
328 m_key = std::move(key_data);
329 }

References key_data(), and m_key.

◆ set_public_seed() [1/2]

void Botan::XMSS_WOTS_PublicKey::set_public_seed ( const secure_vector< uint8_t > &  public_seed)
inline

Definition at line 307 of file xmss_wots.h.

308 {
310 }

References m_public_seed, and public_seed().

◆ set_public_seed() [2/2]

void Botan::XMSS_WOTS_PublicKey::set_public_seed ( secure_vector< uint8_t > &&  public_seed)
inline

Definition at line 312 of file xmss_wots.h.

313 {
314 m_public_seed = std::move(public_seed);
315 }

References m_public_seed, and public_seed().

◆ subject_public_key()

std::vector< uint8_t > Botan::Public_Key::subject_public_key ( ) const
inherited
Returns
X.509 subject key encoding for this key object

Definition at line 38 of file pk_keys.cpp.

39 {
40 std::vector<uint8_t> output;
41
42 DER_Encoder(output).start_cons(SEQUENCE)
43 .encode(algorithm_identifier())
44 .encode(public_key_bits(), BIT_STRING)
45 .end_cons();
46
47 return output;
48 }
virtual AlgorithmIdentifier algorithm_identifier() const =0
virtual std::vector< uint8_t > public_key_bits() const =0
@ BIT_STRING
Definition asn1_obj.h:37
@ SEQUENCE
Definition asn1_obj.h:42

References Botan::Public_Key::algorithm_identifier(), Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::Public_Key::public_key_bits(), Botan::SEQUENCE, and Botan::DER_Encoder::start_cons().

Referenced by Botan::X509::BER_encode(), Botan::PKCS10_Request::create(), Botan::Public_Key::fingerprint_public(), and Botan::X509::PEM_encode().

◆ wots_parameters()

const XMSS_WOTS_Parameters & Botan::XMSS_WOTS_PublicKey::wots_parameters ( ) const
inline

Definition at line 331 of file xmss_wots.h.

332 {
333 return m_wots_params;
334 }

References m_wots_params.

Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key().

Member Data Documentation

◆ m_hash

XMSS_Hash Botan::XMSS_WOTS_PublicKey::m_hash
protected

◆ m_key

wots_keysig_t Botan::XMSS_WOTS_PublicKey::m_key
protected

◆ m_public_seed

secure_vector<uint8_t> Botan::XMSS_WOTS_PublicKey::m_public_seed
protected

◆ m_wots_params

XMSS_WOTS_Parameters Botan::XMSS_WOTS_PublicKey::m_wots_params
protected

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