Botan 2.19.5 Crypto and TLS for C&

Public Member Functions | List of all members
Botan::XMSS_Verification_Operation Class Referencefinal

`#include <xmss_verification_operation.h>`

Inheritance diagram for Botan::XMSS_Verification_Operation:

## Public Member Functions
bool | is_valid_signature (const uint8_t sig[], size_t sig_len) override
void | update (const uint8_t msg[], size_t msg_len) override
| XMSS_Verification_Operation (const XMSS_PublicKey &public_key)

## Detailed Description

Provides signature verification capabilities for Extended Hash-Based Signatures (XMSS).

Definition at line 21 of file xmss_verification_operation.h.

## Constructor & Destructor Documentation

## ◆ XMSS_Verification_Operation()

Botan::XMSS_Verification_Operation::XMSS_Verification_Operation | ( | const XMSS_PublicKey & | public_key | ) |

Definition at line 18 of file xmss_verification_operation.cpp.

19 :
20 m_pub_key(public_key),
21 m_hash(public_key.xmss_hash_function()),
22 m_msg_buf(0)
23 {
24 }

## Member Function Documentation

## ◆ is_valid_signature()

bool Botan::XMSS_Verification_Operation::is_valid_signature | ( | const uint8_t | sig[],
|  | size_t | sig_len
| ) |  |
| override virtual

Implements Botan::PK_Ops::Verification.

Definition at line 119 of file xmss_verification_operation.cpp.

121 {
122 try
123 {
124 XMSS_Signature signature(m_pub_key.xmss_parameters().oid(),
125 secure_vector<uint8_t>(sig, sig + sig_len));
126 bool result = verify(signature, m_msg_buf, m_pub_key);
127 m_msg_buf.clear();
128 return result;
129 }
130 catch(...)
131 {
132 m_msg_buf.clear();
133 return false;
134 }
135 }
Botan::XMSS_Parameters::oid
xmss_algorithm_t oid() const
Definition: xmss_parameters.h:84
Botan::XMSS_PublicKey::xmss_parameters
const XMSS_Parameters & xmss_parameters() const
Definition: xmss.h:108

References Botan::XMSS_Parameters::oid(), and Botan::XMSS_PublicKey::xmss_parameters().

## ◆ update()

void Botan::XMSS_Verification_Operation::update | ( | const uint8_t | msg[],
|  | size_t | msg_len
| ) |  |
| override virtual

Implements Botan::PK_Ops::Verification.

Definition at line 114 of file xmss_verification_operation.cpp.

115 {
116 std::copy(msg, msg + msg_len, std::back_inserter(m_msg_buf));
117 }

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

- src/lib/pubkey/xmss/xmss_verification_operation.h
- src/lib/pubkey/xmss/xmss_verification_operation.cpp