Botan 3.6.1
Crypto and TLS for C&
|
#include <pubkey.h>
Public Member Functions | |
size_t | agreed_value_size () const |
SymmetricKey | derive_key (size_t key_len, const std::span< const uint8_t > in, std::string_view params="") const |
SymmetricKey | derive_key (size_t key_len, const uint8_t in[], size_t in_len, const uint8_t params[], size_t params_len) const |
SymmetricKey | derive_key (size_t key_len, const uint8_t in[], size_t in_len, std::string_view params="") const |
SymmetricKey | derive_key (size_t key_len, std::span< const uint8_t > in, const uint8_t params[], size_t params_len) const |
PK_Key_Agreement & | operator= (const PK_Key_Agreement &)=delete |
PK_Key_Agreement & | operator= (PK_Key_Agreement &&) noexcept |
PK_Key_Agreement (const PK_Key_Agreement &)=delete | |
PK_Key_Agreement (const Private_Key &key, RandomNumberGenerator &rng, std::string_view kdf, std::string_view provider="") | |
PK_Key_Agreement (PK_Key_Agreement &&) noexcept | |
~PK_Key_Agreement () | |
Botan::PK_Key_Agreement::PK_Key_Agreement | ( | const Private_Key & | key, |
RandomNumberGenerator & | rng, | ||
std::string_view | kdf, | ||
std::string_view | provider = "" ) |
Construct a PK Key Agreement.
key | the key to use |
rng | the random generator to use |
kdf | name of the KDF to use (or 'Raw' for no KDF) |
provider | the algo provider to use (or empty for default) |
Definition at line 200 of file pubkey.cpp.
References Botan::Asymmetric_Key::algo_name(), Botan::Private_Key::create_key_agreement_op(), and Botan::fmt().
|
default |
|
delete |
|
defaultnoexcept |
size_t Botan::PK_Key_Agreement::agreed_value_size | ( | ) | const |
Return the underlying size of the value that is agreed. If derive_key is called with a length of 0 with a "Raw" KDF, it will return a value of this size.
Definition at line 215 of file pubkey.cpp.
References agreed_value_size().
Referenced by agreed_value_size().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
const std::span< const uint8_t > | in, | ||
std::string_view | params = "" ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
in | the other parties key |
params | extra derivation params |
Definition at line 226 of file pubkey.cpp.
References Botan::cast_char_ptr_to_uint8(), and derive_key().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
const uint8_t | in[], | ||
size_t | in_len, | ||
const uint8_t | params[], | ||
size_t | params_len ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
in | the other parties key |
in_len | the length of in in bytes |
params | extra derivation params |
params_len | the length of params in bytes |
Definition at line 232 of file pubkey.cpp.
Referenced by derive_key(), derive_key(), Botan::ECIES_KA_Operation::derive_secret(), and Botan::TLS::Callbacks::tls_ephemeral_key_agreement().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
const uint8_t | in[], | ||
size_t | in_len, | ||
std::string_view | params = "" ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
in | the other parties key |
in_len | the length of in in bytes |
params | extra derivation params |
Definition at line 219 of file pubkey.cpp.
References Botan::cast_char_ptr_to_uint8(), and derive_key().
|
inline |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
in | the other parties key |
params | extra derivation params |
params_len | the length of params in bytes |
|
delete |
|
defaultnoexcept |