Botan 2.19.3
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
13BOTAN_DEPRECATED_HEADER(xmss_key_pair.h)
14
15namespace Botan {
16
17/**
18 * A pair of XMSS public and private key.
19 **/
21 {
22 public:
25 : m_priv_key(xmss_oid, rng), m_pub_key(m_priv_key) {}
26
28 const XMSS_PrivateKey& priv_key)
29 : m_priv_key(priv_key), m_pub_key(pub_key)
30 {}
31
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
const XMSS_PublicKey & public_key() const
XMSS_PrivateKey & private_key()
XMSS_Key_Pair(const XMSS_PublicKey &pub_key, const XMSS_PrivateKey &priv_key)
XMSS_Key_Pair(XMSS_PublicKey &&pub_key, XMSS_PrivateKey &&priv_key)
const XMSS_PrivateKey & private_key() const
XMSS_Key_Pair(XMSS_Parameters::xmss_algorithm_t xmss_oid, RandomNumberGenerator &rng)
XMSS_PublicKey & public_key()
#define BOTAN_DEPRECATED_HEADER(hdr)
Definition compiler.h:132
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
Definition bigint.h:1143