Botan  2.15.0
Crypto and TLS for C++11
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/xmss_parameters.h>
12 #include <botan/xmss_wots_parameters.h>
13 #include <botan/xmss_publickey.h>
14 #include <botan/xmss_privatekey.h>
15 
16 BOTAN_DEPRECATED_HEADER(xmss_key_pair.h)
17 
18 namespace Botan {
19 
20 /**
21  * A pair of XMSS public and private key.
22  **/
24  {
25  public:
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 
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
XMSS_Key_Pair(XMSS_PublicKey &&pub_key, XMSS_PrivateKey &&priv_key)
Definition: xmss_key_pair.h:35
const XMSS_PrivateKey & private_key() const
Definition: xmss_key_pair.h:42
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: bigint.h:1142
XMSS_PublicKey & public_key()
Definition: xmss_key_pair.h:40
const XMSS_PublicKey & public_key() const
Definition: xmss_key_pair.h:39
XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid, RandomNumberGenerator &rng)
Definition: xmss_key_pair.h:26
Definition: alg_id.cpp:13
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition: compiler.h:141
XMSS_Key_Pair(const XMSS_PublicKey &pub_key, const XMSS_PrivateKey &priv_key)
Definition: xmss_key_pair.h:30
XMSS_PrivateKey & private_key()
Definition: xmss_key_pair.h:43