Botan 3.6.1
Crypto and TLS for C&
|
#include <tls_extensions.h>
Public Member Functions | |
secure_vector< uint8_t > | decapsulate (const Key_Share &server_keyshare, const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng) |
bool | empty () const override |
virtual bool | is_implemented () const |
Key_Share (const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng) | |
Key_Share (Named_Group selected_group) | |
Key_Share (TLS_Data_Reader &reader, uint16_t extension_size, Handshake_Type message_type) | |
std::vector< Named_Group > | offered_groups () const |
void | retry_offer (const Key_Share &retry_request_keyshare, const std::vector< Named_Group > &supported_groups, Callbacks &cb, RandomNumberGenerator &rng) |
Named_Group | selected_group () const |
std::vector< uint8_t > | serialize (Connection_Side whoami) const override |
secure_vector< uint8_t > | take_shared_secret () |
Extension_Code | type () const override |
~Key_Share () override | |
Static Public Member Functions | |
static std::unique_ptr< Key_Share > | create_as_encapsulation (Group_Params selected_group, const Key_Share &client_keyshare, const Policy &policy, Callbacks &cb, RandomNumberGenerator &rng) |
static Extension_Code | static_type () |
Key_Share from RFC 8446 4.2.8
Definition at line 761 of file tls_extensions.h.
Botan::TLS::Key_Share::Key_Share | ( | TLS_Data_Reader & | reader, |
uint16_t | extension_size, | ||
Handshake_Type | message_type ) |
Definition at line 404 of file tls_extensions_key_share.cpp.
References Botan::TLS::handshake_type_to_string().
Referenced by create_as_encapsulation().
Botan::TLS::Key_Share::Key_Share | ( | const Policy & | policy, |
Callbacks & | cb, | ||
RandomNumberGenerator & | rng ) |
Definition at line 420 of file tls_extensions_key_share.cpp.
|
explicit |
Definition at line 424 of file tls_extensions_key_share.cpp.
|
overridedefault |
|
static |
Creates a Key_Share extension meant for the Server Hello that performs a key encapsulation with the selected public key from the client.
Definition at line 446 of file tls_extensions_key_share.cpp.
References Key_Share(), and selected_group().
secure_vector< uint8_t > Botan::TLS::Key_Share::decapsulate | ( | const Key_Share & | server_keyshare, |
const Policy & | policy, | ||
Callbacks & | cb, | ||
RandomNumberGenerator & | rng ) |
Decapsulate the shared secret with the peer's key share. This method can be called on a ClientHello's Key_Share with a ServerHello's Key_Share.
Definition at line 454 of file tls_extensions_key_share.cpp.
|
overridevirtual |
Implements Botan::TLS::Extension.
Definition at line 442 of file tls_extensions_key_share.cpp.
|
inlinevirtualinherited |
Reimplemented in Botan::TLS::Unknown_Extension.
Definition at line 116 of file tls_extensions.h.
std::vector< Named_Group > Botan::TLS::Key_Share::offered_groups | ( | ) | const |
Definition at line 469 of file tls_extensions_key_share.cpp.
Referenced by Botan::TLS::Hello_Retry_Request::Hello_Retry_Request().
void Botan::TLS::Key_Share::retry_offer | ( | const Key_Share & | retry_request_keyshare, |
const std::vector< Named_Group > & | supported_groups, | ||
Callbacks & | cb, | ||
RandomNumberGenerator & | rng ) |
Update a ClientHello's Key_Share to comply with a HelloRetryRequest.
This will create new Key_Share_Entries and should only be called on a ClientHello Key_Share with a HelloRetryRequest Key_Share.
Definition at line 486 of file tls_extensions_key_share.cpp.
References Botan::value_exists().
Named_Group Botan::TLS::Key_Share::selected_group | ( | ) | const |
Definition at line 473 of file tls_extensions_key_share.cpp.
Referenced by create_as_encapsulation().
|
overridevirtual |
Implements Botan::TLS::Extension.
Definition at line 438 of file tls_extensions_key_share.cpp.
|
inlinestatic |
Definition at line 763 of file tls_extensions.h.
secure_vector< uint8_t > Botan::TLS::Key_Share::take_shared_secret | ( | ) |
Definition at line 477 of file tls_extensions_key_share.cpp.
|
inlineoverridevirtual |
Implements Botan::TLS::Extension.
Definition at line 765 of file tls_extensions.h.