8#ifndef BOTAN_PK_KEYS_H_
9#define BOTAN_PK_KEYS_H_
11#include <botan/asn1_obj.h>
12#include <botan/pk_ops_fwd.h>
13#include <botan/secmem.h>
23class RandomNumberGenerator;
84 virtual OID object_identifier()
const;
99 virtual const BigInt& get_int_field(std::string_view field)
const;
167 std::vector<uint8_t> subject_public_key()
const;
172 std::string fingerprint_public(std::string_view alg =
"SHA-256")
const;
202 return (this->message_parts() >= 2) ? Signature_Format::DerSequence : Signature_Format::Standard;
218 std::string_view params,
219 std::string_view provider)
const;
230 virtual std::unique_ptr<PK_Ops::KEM_Encryption> create_kem_encryption_op(std::string_view params,
231 std::string_view provider)
const;
241 virtual std::unique_ptr<PK_Ops::Verification> create_verification_op(std::string_view params,
242 std::string_view provider)
const;
256 virtual std::unique_ptr<PK_Ops::Verification> create_x509_verification_op(
316 std::string fingerprint_private(std::string_view alg)
const;
332 std::string_view params,
333 std::string_view provider)
const;
348 std::string_view params,
349 std::string_view provider)
const;
364 std::string_view params,
365 std::string_view provider)
const;
380 std::string_view params,
381 std::string_view provider)
const;
virtual std::string algo_name() const =0
virtual ~Asymmetric_Key()=default
virtual bool supports_operation(PublicKeyOperation op) const =0
virtual std::unique_ptr< Private_Key > generate_another(RandomNumberGenerator &rng) const =0
virtual size_t estimated_strength() const =0
virtual std::vector< uint8_t > public_value() const =0
virtual std::unique_ptr< Public_Key > public_key() const =0
virtual AlgorithmIdentifier pkcs8_algorithm_identifier() const
virtual std::optional< uint64_t > remaining_operations() const
Retrieves the number of remaining operations if this is a stateful private key.
virtual bool stateful_operation() const
virtual secure_vector< uint8_t > private_key_bits() const =0
virtual AlgorithmIdentifier algorithm_identifier() const =0
virtual std::vector< uint8_t > public_key_bits() const =0
virtual Signature_Format default_x509_signature_format() const
virtual bool check_key(RandomNumberGenerator &rng, bool strong) const =0
virtual std::vector< uint8_t > raw_public_key_bits() const =0
virtual size_t key_length() const =0
virtual size_t message_part_size() const
virtual size_t message_parts() const
#define BOTAN_PUBLIC_API(maj, min)
#define BOTAN_DEPRECATED(msg)
std::string create_hex_fingerprint(const uint8_t bits[], size_t bits_len, std::string_view hash_name)
std::vector< T, secure_allocator< T > > secure_vector