Botan 2.19.5 Crypto and TLS for C&

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.h>
12
13 BOTAN_DEPRECATED_HEADER(xmss_key_pair.h)
14
15namespace Botan {
16
17/**
18 * A pair of XMSS public and private key.
19 **/
20 class BOTAN_PUBLIC_API(2,0) XMSS_Key_Pair
21 {
22 public:
23 XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid,
24 RandomNumberGenerator& rng)
25 : m_priv_key(xmss_oid, rng), m_pub_key(m_priv_key) {}
26
27 XMSS_Key_Pair(const XMSS_PublicKey& pub_key,
28 const XMSS_PrivateKey& priv_key)
29 : m_priv_key(priv_key), m_pub_key(pub_key)
30 {}
31
32 XMSS_Key_Pair(XMSS_PublicKey&& pub_key,
33 XMSS_PrivateKey&& priv_key)
34 : m_priv_key(std::move(priv_key)), m_pub_key(std::move(pub_key)) {}
35
36 const XMSS_PublicKey& public_key() const { return m_pub_key; }
37 XMSS_PublicKey& public_key() { return m_pub_key; }
38
39 const XMSS_PrivateKey& private_key() const { return m_priv_key; }
40 XMSS_PrivateKey& private_key() { return m_priv_key; }
41
42 private:
43 XMSS_PrivateKey m_priv_key;
44 XMSS_PublicKey m_pub_key;
45 };
46
47}
48
49#endif
Botan::RandomNumberGenerator
Definition: rng.h:26
Botan::XMSS_Key_Pair
Definition: xmss_key_pair.h:21
Botan::XMSS_Key_Pair::public_key
const XMSS_PublicKey & public_key() const
Definition: xmss_key_pair.h:36
Botan::XMSS_Key_Pair::private_key
XMSS_PrivateKey & private_key()
Definition: xmss_key_pair.h:40
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:27
Botan::XMSS_Key_Pair::XMSS_Key_Pair
XMSS_Key_Pair(XMSS_PublicKey &&pub_key, XMSS_PrivateKey &&priv_key)
Definition: xmss_key_pair.h:32
Botan::XMSS_Key_Pair::private_key
const XMSS_PrivateKey & private_key() const
Definition: xmss_key_pair.h:39
Botan::XMSS_Key_Pair::XMSS_Key_Pair
XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid, RandomNumberGenerator &rng)
Definition: xmss_key_pair.h:23
Botan::XMSS_Key_Pair::public_key
XMSS_PublicKey & public_key()
Definition: xmss_key_pair.h:37
Botan::XMSS_Parameters::xmss_algorithm_t
xmss_algorithm_t
Definition: xmss_parameters.h:27
Botan::XMSS_PrivateKey
Definition: xmss.h:271
Botan::XMSS_PublicKey
Definition: xmss.h:31
BOTAN_DEPRECATED_HEADER
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition: compiler.h:132
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Botan
Definition: alg_id.cpp:13
std
Definition: bigint.h:1155