Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

xmss_key_pair.h
Go to the documentation of this file.
1 /*
2 * XMSS Key Pair
3 * (C) 2016 Matthias Gierlings
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 **/
7
8 #ifndef BOTAN_XMSS_KEY_PAIR_H__
9 #define BOTAN_XMSS_KEY_PAIR_H__
10
11 #include <botan/botan.h>
12 #include <botan/rng.h>
13 #include <botan/xmss_parameters.h>
14 #include <botan/xmss_wots_parameters.h>
15 #include <botan/xmss_publickey.h>
16 #include <botan/xmss_privatekey.h>
17
18 namespace Botan {
19
20 /**
21 * A pair of XMSS public and private key.
22 **/
23 class BOTAN_DLL XMSS_Key_Pair
24 {
25 public:
26 XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid,
27 RandomNumberGenerator& rng)
28 : m_priv_key(xmss_oid, rng), m_pub_key(m_priv_key) {}
29
30 XMSS_Key_Pair(const XMSS_PublicKey& pub_key,
31 const XMSS_PrivateKey& priv_key)
32 : m_priv_key(priv_key), m_pub_key(pub_key)
33 {}
34
35 XMSS_Key_Pair(XMSS_PublicKey&& pub_key,
36 XMSS_PrivateKey&& priv_key)
37 : m_priv_key(std::move(priv_key)), m_pub_key(std::move(pub_key)) {}
38
39 const XMSS_PublicKey& public_key() const { return m_pub_key; }
40 XMSS_PublicKey& public_key() { return m_pub_key; }
41
42 const XMSS_PrivateKey& private_key() const { return m_priv_key; }
43 XMSS_PrivateKey& private_key() { return m_priv_key; }
44
45 private:
46 XMSS_PrivateKey m_priv_key;
47 XMSS_PublicKey m_pub_key;
48 };
49
50 }
51
52 #endif
Botan::XMSS_Key_Pair::XMSS_Key_Pair
XMSS_Key_Pair(XMSS_PublicKey &&pub_key, XMSS_PrivateKey &&priv_key)
Definition: xmss_key_pair.h:35
Botan::XMSS_Key_Pair::private_key
const XMSS_PrivateKey & private_key() const
Definition: xmss_key_pair.h:42
Botan::RandomNumberGenerator
Definition: rng.h:25
Botan::XMSS_PublicKey
Definition: xmss_publickey.h:43
std
Definition: bigint.h:619
Botan::XMSS_Key_Pair::public_key
const XMSS_PublicKey & public_key() const
Definition: xmss_key_pair.h:39
Botan::XMSS_Key_Pair::public_key
XMSS_PublicKey & public_key()
Definition: xmss_key_pair.h:40
Botan::XMSS_PrivateKey
Definition: xmss_privatekey.h:40
Botan::XMSS_Key_Pair
Definition: xmss_key_pair.h:23
Botan::XMSS_Key_Pair::XMSS_Key_Pair
XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid, RandomNumberGenerator &rng)
Definition: xmss_key_pair.h:26
Botan
Definition: alg_id.cpp:13
Botan::XMSS_Parameters::xmss_algorithm_t
xmss_algorithm_t
Definition: xmss_parameters.h:31
Botan::XMSS_Key_Pair::XMSS_Key_Pair
XMSS_Key_Pair(const XMSS_PublicKey &pub_key, const XMSS_PrivateKey &priv_key)
Definition: xmss_key_pair.h:30
Botan::XMSS_Key_Pair::private_key
XMSS_PrivateKey & private_key()
Definition: xmss_key_pair.h:43