7#ifndef BOTAN_PK_OPERATIONS_H_
8#define BOTAN_PK_OPERATIONS_H_
26#include <botan/pk_keys.h>
27#include <botan/secmem.h>
31class RandomNumberGenerator;
58 const uint8_t ciphertext[],
59 size_t ciphertext_len) = 0;
76 virtual void update(
const uint8_t msg[],
size_t msg_len) = 0;
101 virtual void update(
const uint8_t msg[],
size_t msg_len) = 0;
135 size_t key_len,
const uint8_t other_key[],
size_t other_key_len,
const uint8_t salt[],
size_t salt_len) = 0;
148 std::span<uint8_t> out_shared_key,
150 size_t desired_shared_key_len,
151 std::span<const uint8_t> salt) = 0;
163 std::span<const uint8_t> encapsulated_key,
164 size_t desired_shared_key_len,
165 std::span<const uint8_t> salt) = 0;
virtual secure_vector< uint8_t > decrypt(uint8_t &valid_mask, const uint8_t ciphertext[], size_t ciphertext_len)=0
virtual ~Decryption()=default
virtual size_t plaintext_length(size_t ctext_len) const =0
virtual size_t ciphertext_length(size_t ptext_len) const =0
virtual ~Encryption()=default
virtual secure_vector< uint8_t > encrypt(const uint8_t msg[], size_t msg_len, RandomNumberGenerator &rng)=0
virtual size_t max_input_bits() const =0
virtual void kem_decrypt(std::span< uint8_t > out_shared_key, std::span< const uint8_t > encapsulated_key, size_t desired_shared_key_len, std::span< const uint8_t > salt)=0
virtual ~KEM_Decryption()=default
virtual size_t encapsulated_key_length() const =0
virtual size_t shared_key_length(size_t desired_shared_key_len) const =0
virtual size_t encapsulated_key_length() const =0
virtual ~KEM_Encryption()=default
virtual void kem_encrypt(std::span< uint8_t > out_encapsulated_key, std::span< uint8_t > out_shared_key, RandomNumberGenerator &rng, size_t desired_shared_key_len, std::span< const uint8_t > salt)=0
virtual size_t shared_key_length(size_t desired_shared_key_len) const =0
virtual secure_vector< uint8_t > agree(size_t key_len, const uint8_t other_key[], size_t other_key_len, const uint8_t salt[], size_t salt_len)=0
virtual size_t agreed_value_size() const =0
virtual ~Key_Agreement()=default
virtual size_t signature_length() const =0
virtual ~Signature()=default
virtual std::string hash_function() const =0
virtual secure_vector< uint8_t > sign(RandomNumberGenerator &rng)=0
virtual void update(const uint8_t msg[], size_t msg_len)=0
virtual void update(const uint8_t msg[], size_t msg_len)=0
virtual std::string hash_function() const =0
virtual bool is_valid_signature(const uint8_t sig[], size_t sig_len)=0
virtual ~Verification()=default
#define BOTAN_UNSTABLE_API
std::vector< T, secure_allocator< T > > secure_vector