#include <pk_ops_impl.h>
Definition at line 119 of file pk_ops_impl.h.
◆ ~KEM_Encryption_with_KDF()
Botan::PK_Ops::KEM_Encryption_with_KDF::~KEM_Encryption_with_KDF |
( |
| ) |
|
|
overridedefault |
◆ KEM_Encryption_with_KDF()
Botan::PK_Ops::KEM_Encryption_with_KDF::KEM_Encryption_with_KDF |
( |
std::string_view | kdf | ) |
|
|
explicitprotected |
Definition at line 205 of file pk_ops.cpp.
205 {
206 if(kdf != "Raw") {
208 }
209}
static std::unique_ptr< KDF > create_or_throw(std::string_view algo_spec, std::string_view provider="")
References Botan::KDF::create_or_throw().
◆ encapsulated_key_length()
virtual size_t Botan::PK_Ops::KEM_Encryption::encapsulated_key_length |
( |
| ) |
const |
|
pure virtualinherited |
◆ kem_encrypt()
void Botan::PK_Ops::KEM_Encryption_with_KDF::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 ) |
|
finalvirtual |
Implements Botan::PK_Ops::KEM_Encryption.
Definition at line 184 of file pk_ops.cpp.
188 {
189 BOTAN_ARG_CHECK(salt.empty() || m_kdf,
"PK_KEM_Encryptor::encrypt requires a KDF to use a salt");
191
192 if(m_kdf) {
194 out_shared_key.size(), desired_shared_key_len, "KDF output length and shared key length match");
195
198 m_kdf->derive_key(out_shared_key, raw_shared, salt, {});
199 } else {
202 }
203}
#define BOTAN_ASSERT_NOMSG(expr)
#define BOTAN_ASSERT_EQUAL(expr1, expr2, assertion_made)
#define BOTAN_ARG_CHECK(expr, msg)
virtual size_t raw_kem_shared_key_length() const =0
virtual void raw_kem_encrypt(std::span< uint8_t > out_encapsulated_key, std::span< uint8_t > out_raw_shared_key, RandomNumberGenerator &rng)=0
virtual size_t encapsulated_key_length() const =0
std::vector< T, secure_allocator< T > > secure_vector
References BOTAN_ARG_CHECK, BOTAN_ASSERT_EQUAL, and BOTAN_ASSERT_NOMSG.
◆ raw_kem_encrypt()
virtual void Botan::PK_Ops::KEM_Encryption_with_KDF::raw_kem_encrypt |
( |
std::span< uint8_t > | out_encapsulated_key, |
|
|
std::span< uint8_t > | out_raw_shared_key, |
|
|
RandomNumberGenerator & | rng ) |
|
protectedpure virtual |
◆ raw_kem_shared_key_length()
virtual size_t Botan::PK_Ops::KEM_Encryption_with_KDF::raw_kem_shared_key_length |
( |
| ) |
const |
|
protectedpure virtual |
◆ shared_key_length()
size_t Botan::PK_Ops::KEM_Encryption_with_KDF::shared_key_length |
( |
size_t | desired_shared_key_len | ) |
const |
|
finalvirtual |
The documentation for this class was generated from the following files: