Botan
2.1.0
Crypto and TLS for C++11
|
#include <xmss_wots_publickey.h>
Classes | |
class | TreeSignature |
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) |
Protected Attributes | |
XMSS_Hash | m_hash |
wots_keysig_t | m_key |
secure_vector< uint8_t > | m_public_seed |
XMSS_WOTS_Parameters | m_wots_params |
A Winternitz One Time Signature public key for use with Extended Hash-Based Signatures.
Definition at line 32 of file xmss_wots_publickey.h.
|
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.
oid | Identifier for the selected signature method. |
Definition at line 84 of file xmss_wots_publickey.h.
|
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.
oid | Identifier for the selected signature method. |
rng | A random number generate used to generate the public seed. |
Definition at line 97 of file xmss_wots_publickey.h.
|
inline |
Creates a XMSS_WOTS_PrivateKey for the signature method identified by oid, with a precomputed public seed.
oid | Identifier for the selected signature method. |
public_seed | A precomputed public seed of n-bytes length. |
Definition at line 110 of file xmss_wots_publickey.h.
|
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.
oid | Ident:s/ifier for the selected signature methods. |
public_seed | A precomputed public seed of n-bytes length. |
key | Precomputed raw key data of the XMSS_WOTS_PublicKey. |
Definition at line 126 of file xmss_wots_publickey.h.
|
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.
oid | Identifier for the selected signature methods. |
public_seed | A precomputed public seed of n-bytes length. |
key | Precomputed raw key data of the XMSS_WOTS_PublicKey. |
Definition at line 145 of file xmss_wots_publickey.h.
|
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.
oid | WOTSP algorithm identifier. |
msg | A message. |
sig | A WOTS signature for msg. |
adrs | An XMSS_Address. |
public_seed | The public public_seed. |
Definition at line 165 of file xmss_wots_publickey.h.
|
inlineoverridevirtual |
Get the name of the underlying public key scheme.
Implements Botan::Public_Key.
Definition at line 234 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::algo_name(), Botan::XMSS_WOTS_PrivateKey::create_signature_op(), and create_verification_op().
|
inlineoverridevirtual |
Implements Botan::Public_Key.
Definition at line 239 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::algorithm_identifier().
|
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".
[out] | x | An n-byte input string, that will be transformed into the chaining function result. |
start_idx | The start index. | |
steps | A number of steps. | |
adrs | An OTS Hash Address. | |
public_seed | A public seed. |
Definition at line 17 of file xmss_wots_publickey.cpp.
References Botan::XMSS_Address::bytes(), Botan::XMSS_Hash::f(), Botan::XMSS_Address::Key_Mode, m_hash, m_wots_params, Botan::XMSS_Address::Mask_Mode, Botan::XMSS_Hash::prf(), 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 Botan::XMSS_WOTS_PrivateKey::generate_public_key(), and Botan::XMSS_WOTS_PrivateKey::sign().
|
inlineoverridevirtual |
Test the key values for consistency.
rng | rng to use |
strong | whether to perform strong and lengthy version of the test |
Implements Botan::Public_Key.
Definition at line 244 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::check_key().
|
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
rng | a 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. |
params | additional parameters |
provider | the provider to use |
Reimplemented in Botan::RSA_PublicKey, and Botan::ElGamal_PublicKey.
Definition at line 79 of file pk_keys.cpp.
References Botan::Public_Key::algo_name().
Referenced by Botan::PK_Encryptor_EME::PK_Encryptor_EME().
|
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
rng | a 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. |
params | additional parameters |
provider | the provider to use |
Reimplemented in Botan::RSA_PublicKey, and Botan::McEliece_PublicKey.
Definition at line 87 of file pk_keys.cpp.
References Botan::Public_Key::algo_name().
Referenced by Botan::PK_KEM_Encryptor::PK_KEM_Encryptor().
|
overridevirtual |
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
params | additional parameters |
provider | the provider to use |
Reimplemented from Botan::Public_Key.
Definition at line 68 of file xmss_wots_publickey.cpp.
References algo_name().
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::create_verification_op().
|
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.
Implements Botan::Public_Key.
Definition at line 253 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::estimated_strength(), and Botan::XMSS_WOTS_Addressed_PublicKey::key_length().
|
virtualinherited |
Get the OID of the underlying public key scheme.
Reimplemented in Botan::XMSS_WOTS_Addressed_PublicKey.
Definition at line 30 of file pk_keys.cpp.
References Botan::Public_Key::algo_name(), and Botan::OIDS::lookup().
Referenced by Botan::DL_Scheme_PublicKey::algorithm_identifier(), Botan::Curve25519_PublicKey::algorithm_identifier(), Botan::McEliece_PublicKey::algorithm_identifier(), Botan::RSA_PublicKey::algorithm_identifier(), Botan::GOST_3410_PublicKey::algorithm_identifier(), Botan::EC_PublicKey::algorithm_identifier(), Botan::TPM_PrivateKey::algorithm_identifier(), and Botan::XMSS_WOTS_Addressed_PublicKey::get_oid().
|
inline |
Definition at line 215 of file xmss_wots_publickey.h.
References m_key.
Referenced by Botan::XMSS_WOTS_Verification_Operation::is_valid_signature().
|
inline |
|
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 258 of file xmss_wots_publickey.h.
|
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.
Reimplemented in Botan::GOST_3410_PublicKey, Botan::ECDSA_PublicKey, Botan::ECGDSA_PublicKey, Botan::ECKCDSA_PublicKey, and Botan::DSA_PublicKey.
Definition at line 114 of file pk_keys.h.
Referenced by Botan::PK_Signer::PK_Signer(), and Botan::PK_Verifier::PK_Verifier().
|
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.
Reimplemented in Botan::GOST_3410_PublicKey, Botan::ECDSA_PublicKey, Botan::ECGDSA_PublicKey, Botan::ECKCDSA_PublicKey, and Botan::DSA_PublicKey.
Definition at line 103 of file pk_keys.h.
Referenced by Botan::X509_Object::check_signature(), Botan::choose_sig_format(), Botan::PK_Signer::PK_Signer(), and Botan::PK_Verifier::PK_Verifier().
|
inline |
Convert the key into the raw key data. The key becomes a length len vector of n-byte elements.
Definition at line 193 of file xmss_wots_publickey.h.
References m_key.
|
inline |
Convert the key into the raw key data. The key becomes a length len vector of n-byte elements.
Definition at line 199 of file xmss_wots_publickey.h.
References m_key.
|
inline |
Definition at line 273 of file xmss_wots_publickey.h.
|
inline |
Definition at line 268 of file xmss_wots_publickey.h.
|
inline |
Retrieves the i-th element out of the length len chain of n-byte elements contained in the public key.
i | index of the element. |
Definition at line 186 of file xmss_wots_publickey.h.
References m_key.
|
inline |
|
inlineoverridevirtual |
Implements Botan::Public_Key.
Definition at line 263 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_Addressed_PublicKey::public_key_bits().
|
inline |
Definition at line 201 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key(), and Botan::XMSS_WOTS_Verification_Operation::is_valid_signature().
|
inline |
Definition at line 203 of file xmss_wots_publickey.h.
|
inline |
Definition at line 219 of file xmss_wots_publickey.h.
References m_key.
Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key().
|
inline |
Definition at line 224 of file xmss_wots_publickey.h.
References m_key.
|
inline |
Definition at line 205 of file xmss_wots_publickey.h.
|
inline |
Definition at line 210 of file xmss_wots_publickey.h.
|
inherited |
Definition at line 17 of file pk_keys.cpp.
References Botan::Public_Key::algorithm_identifier(), Botan::BIT_STRING, Botan::DER_Encoder::encode(), Botan::DER_Encoder::end_cons(), Botan::DER_Encoder::get_contents_unlocked(), Botan::Public_Key::public_key_bits(), Botan::SEQUENCE, and Botan::DER_Encoder::start_cons().
Referenced by Botan::X509::BER_encode(), and Botan::X509::PEM_encode().
|
inline |
Definition at line 229 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::generate_public_key(), Botan::XMSS_WOTS_Verification_Operation::is_valid_signature(), Botan::XMSS_PrivateKey::tree_hash(), Botan::XMSS_WOTS_Verification_Operation::update(), Botan::XMSS_WOTS_Signature_Operation::update(), Botan::XMSS_WOTS_Signature_Operation::XMSS_WOTS_Signature_Operation(), and Botan::XMSS_WOTS_Verification_Operation::XMSS_WOTS_Verification_Operation().
|
protected |
Definition at line 302 of file xmss_wots_publickey.h.
Referenced by chain().
|
protected |
Definition at line 304 of file xmss_wots_publickey.h.
Referenced by operator==().
|
protected |
Definition at line 305 of file xmss_wots_publickey.h.
Referenced by Botan::XMSS_WOTS_PrivateKey::sign().
|
protected |
Definition at line 301 of file xmss_wots_publickey.h.
Referenced by chain(), Botan::XMSS_WOTS_PrivateKey::generate_public_key(), and Botan::XMSS_WOTS_PrivateKey::sign().