blob: a0cb0709f7d8e3d566ba7bb64fc44d9b04091256 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/**
* XMSS_WOTS_Verification_Operation.h
* (C) 2016 Matthias Gierlings
*
* Botan is released under the Simplified BSD License (see license.txt)
**/
#ifndef BOTAN_XMSS_WOTS_VERIFICATION_OPERATION_H__
#define BOTAN_XMSS_WOTS_VERIFICATION_OPERATION_H__
#include <cstddef>
#include <iterator>
#include <botan/types.h>
#include <botan/pk_ops.h>
#include <botan/internal/xmss_wots_addressed_publickey.h>
#include <botan/internal/xmss_wots_common_ops.h>
namespace Botan {
/**
* Provides signature verification capabilities for Winternitz One Time
* Signatures used in Extended Merkle Tree Signatures (XMSS).
*
* This operation is not intended for stand-alone use and thus not registered
* in the Botan algorithm registry.
**/
class XMSS_WOTS_Verification_Operation
: public virtual PK_Ops::Verification,
public XMSS_WOTS_Common_Ops
{
public:
XMSS_WOTS_Verification_Operation(
const XMSS_WOTS_Addressed_PublicKey& public_key);
virtual ~XMSS_WOTS_Verification_Operation() {}
virtual bool is_valid_signature(const byte sig[],
size_t sig_len) override;
void update(const byte msg[], size_t msg_len) override;
private:
XMSS_WOTS_Addressed_PublicKey m_pub_key;
secure_vector<byte> m_msg_buf;
};
}
#endif
|