Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

xmss_wots_common_ops.h
Go to the documentation of this file.
1 /**
2 * XMSS WOTS Common Operations
3 * (C) 2016 Matthias Gierlings
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 **/
7
8 #ifndef BOTAN_XMSS_WOTS_COMMON_OPS_H__
9 #define BOTAN_XMSS_WOTS_COMMON_OPS_H__
10
11 #include <cstddef>
12 #include <botan/types.h>
13 #include <botan/xmss_wots_parameters.h>
14 #include <botan/xmss_address.h>
15 #include <botan/xmss_hash.h>
16
17 namespace Botan {
18
19 /**
20 * Operations shared by XMSS WOTS signature generation and verification
21 * operations.
22 **/
23 class XMSS_WOTS_Common_Ops
24 {
25 public:
26 XMSS_WOTS_Common_Ops(XMSS_WOTS_Parameters::ots_algorithm_t oid)
27 : m_wots_params(oid), m_hash(m_wots_params.hash_function_name()) {}
28
29
30 protected:
31 /**
32 * Algorithm 2: Chaining Function.
33 *
34 * @param[out] result Contains the n-byte input string "x" upon call to chain(),
35 * that will be replaced with the value obtained by iterating
36 * the cryptographic hash function "F" steps times on the
37 * input x using the outputs of the PRNG "G".
38 * @param[in] start_idx The start index.
39 * @param[in] steps A number of steps.
40 * @param[in] adrs An OTS Hash Address.
41 * @param[in] seed A Seed.
42 **/
43 void chain(secure_vector<uint8_t>& result,
44 size_t start_idx,
45 size_t steps,
46 XMSS_Address& adrs,
47 const secure_vector<uint8_t>& seed);
48
49 XMSS_WOTS_Parameters m_wots_params;
50 XMSS_Hash m_hash;
51 };
52
53 }
54
55 #endif
Botan::XMSS_WOTS_Common_Ops::m_hash
XMSS_Hash m_hash
Definition: xmss_wots_common_ops.h:50
Botan::XMSS_WOTS_Common_Ops::chain
void chain(secure_vector< uint8_t > &result, size_t start_idx, size_t steps, XMSS_Address &adrs, const secure_vector< uint8_t > &seed)
Definition: xmss_wots_common_ops.cpp:16
Botan::XMSS_Hash
Definition: xmss_hash.h:24
Botan::XMSS_WOTS_Parameters
Definition: xmss_wots_parameters.h:34
Botan::XMSS_Address
Definition: xmss_address.h:23
Botan::XMSS_WOTS_Common_Ops
Definition: xmss_wots_common_ops.h:23
Botan::secure_vector
std::vector< T, secure_allocator< T >> secure_vector
Definition: secmem.h:121
Botan::XMSS_WOTS_Common_Ops::m_wots_params
XMSS_WOTS_Parameters m_wots_params
Definition: xmss_wots_common_ops.h:49
Botan
Definition: alg_id.cpp:13
Botan::XMSS_WOTS_Common_Ops::XMSS_WOTS_Common_Ops
XMSS_WOTS_Common_Ops(XMSS_WOTS_Parameters::ots_algorithm_t oid)
Definition: xmss_wots_common_ops.h:26
Botan::XMSS_WOTS_Parameters::ots_algorithm_t
ots_algorithm_t
Definition: xmss_wots_parameters.h:37