12#include <botan/pk_keys.h>
14#include <botan/cmce_parameter_set.h>
71 std::string
algo_name()
const override {
return "ClassicMcEliece"; }
75 OID object_identifier()
const override;
77 size_t key_length()
const override;
79 size_t estimated_strength()
const override;
81 std::vector<uint8_t> public_key_bits()
const override;
83 std::vector<uint8_t> raw_public_key_bits()
const override;
93 std::unique_ptr<PK_Ops::KEM_Encryption> _create_kem_encryption_op(
100 std::shared_ptr<const Classic_McEliece_PublicKeyInternal>
m_public;
133 std::unique_ptr<Public_Key>
public_key()
const override;
145 std::shared_ptr<const Classic_McEliece_PrivateKeyInternal> m_private;
#define BOTAN_DIAGNOSTIC_POP
#define BOTAN_DIAGNOSTIC_PUSH
#define BOTAN_DIAGNOSTIC_IGNORE_INHERITED_VIA_DOMINANCE
#define BOTAN_PUBLIC_API(maj, min)
Representation of a Classic McEliece private key.
std::unique_ptr< PK_Ops::KEM_Decryption > _create_kem_decryption_op(RandomNumberGenerator &rng, const PK_KEM_Options_Reader &options) const override
Classic_McEliece_PrivateKey(RandomNumberGenerator &rng, Classic_McEliece_Parameter_Set param_set)
Create a new Classic McEliece private key for a specified parameter set.
bool check_key(RandomNumberGenerator &rng, bool strong) const override
secure_vector< uint8_t > private_key_bits() const override
std::unique_ptr< Public_Key > public_key() const override
secure_vector< uint8_t > raw_private_key_bits() const override
Representation of a Classic McEliece public key.
bool supports_operation(PublicKeyOperation op) const override
Classic_McEliece_PublicKey()=default
Classic_McEliece_PublicKey & operator=(Classic_McEliece_PublicKey &&)=default
Classic_McEliece_PublicKey(Classic_McEliece_PublicKey &&)=default
~Classic_McEliece_PublicKey() override=default
Classic_McEliece_PublicKey & operator=(const Classic_McEliece_PublicKey &other)
Classic_McEliece_PublicKey(const AlgorithmIdentifier &alg_id, std::span< const uint8_t > key_bits)
Load a Classic McEliece public key from bytes.
std::shared_ptr< const Classic_McEliece_PublicKeyInternal > m_public
std::string algo_name() const override
std::vector< T, secure_allocator< T > > secure_vector