Botan 3.9.0
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 uint8_t peer_key[], size_t peer_key_len, const uint8_t salt[], size_t salt_len) const |
SymmetricKey | derive_key (size_t key_len, const uint8_t peer_key[], size_t peer_key_len, std::string_view salt="") const |
SymmetricKey | derive_key (size_t key_len, std::span< const uint8_t > peer_key, const uint8_t salt[], size_t salt_len) const |
SymmetricKey | derive_key (size_t key_len, std::span< const uint8_t > peer_key, std::span< const uint8_t > salt) const |
SymmetricKey | derive_key (size_t key_len, std::span< const uint8_t > peer_key, std::string_view salt="") 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 215 of file pubkey.cpp.
References Botan::Asymmetric_Key::algo_name(), Botan::Private_Key::create_key_agreement_op(), and Botan::fmt().
Referenced by agreed_value_size(), operator=(), operator=(), PK_Key_Agreement(), and PK_Key_Agreement().
|
default |
|
delete |
References PK_Key_Agreement().
|
defaultnoexcept |
References PK_Key_Agreement().
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 230 of file pubkey.cpp.
References agreed_value_size(), and PK_Key_Agreement().
Referenced by agreed_value_size().
|
inline |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
peer_key | the other parties key |
peer_key_len | the length of peer_key in bytes |
salt | extra derivation salt |
salt_len | the length of salt in bytes |
Definition at line 435 of file pubkey.h.
References derive_key().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
const uint8_t | peer_key[], | ||
size_t | peer_key_len, | ||
std::string_view | salt = "" ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
peer_key | the other parties key |
peer_key_len | the length of peer_key in bytes |
salt | extra derivation info |
Definition at line 234 of file pubkey.cpp.
References Botan::as_span_of_bytes(), and derive_key().
|
inline |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
peer_key | the other parties key |
salt | extra derivation salt |
salt_len | the length of salt in bytes |
Definition at line 447 of file pubkey.h.
References derive_key().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
std::span< const uint8_t > | peer_key, | ||
std::span< const uint8_t > | salt ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
peer_key | the other parties key |
salt | extra derivation salt |
Definition at line 247 of file pubkey.cpp.
Referenced by derive_key(), derive_key(), derive_key(), derive_key(), operator=(), and Botan::TLS::Callbacks::tls_ephemeral_key_agreement().
SymmetricKey Botan::PK_Key_Agreement::derive_key | ( | size_t | key_len, |
std::span< const uint8_t > | peer_key, | ||
std::string_view | salt = "" ) const |
Perform Key Agreement Operation
key_len | the desired key output size (ignored if "Raw" KDF is used) |
peer_key | the other parties key |
salt | extra derivation info |
Definition at line 241 of file pubkey.cpp.
References Botan::as_span_of_bytes(), and derive_key().
|
delete |
References PK_Key_Agreement().
|
defaultnoexcept |
References derive_key(), and PK_Key_Agreement().