|
Botan 3.14.1
Crypto and TLS for C&
|
#include <pk_options.h>
Public Member Functions | |
| PK_Key_Agreement_Options & | operator= (const PK_Key_Agreement_Options &other)=default |
| PK_Key_Agreement_Options & | operator= (PK_Key_Agreement_Options &&other)=default |
| PK_Key_Agreement_Options ()=default | |
| PK_Key_Agreement_Options (const PK_Key_Agreement_Options &)=default | |
| PK_Key_Agreement_Options (PK_Key_Agreement_Options &&other)=default | |
| std::string | to_string () const |
| PK_Key_Agreement_Options | with_kdf (std::string_view kdf) |
| PK_Key_Agreement_Options | with_provider (std::string_view provider) |
| PK_Key_Agreement_Options | with_raw_shared_key () |
| ~PK_Key_Agreement_Options () | |
Friends | |
| class | PK_Key_Agreement_Options_Reader |
Key agreement options
The normal usage of this is in a builder style, eg
PK_Key_Agreement_Options().with_kdf("HKDF(SHA-256)")
As with PK_Signature_Options, every option that is set must be understood by the scheme in use; constructing the PK_Key_Agreement throws an exception otherwise.
Definition at line 351 of file pk_options.h.
|
default |
|
default |
References PK_Key_Agreement_Options().
|
default |
References PK_Key_Agreement_Options().
|
default |
References PK_Key_Agreement_Options(), to_string(), with_kdf(), with_provider(), and with_raw_shared_key().
|
default |
References PK_Key_Agreement_Options().
|
default |
References PK_Key_Agreement_Options().
| std::string Botan::PK_Key_Agreement_Options::to_string | ( | ) | const |
Format this PK_Key_Agreement_Options as a string
This is primarily intended for debugging and error messages; the format is not fixed
Definition at line 547 of file pk_options.cpp.
Referenced by ~PK_Key_Agreement_Options().
| PK_Key_Agreement_Options Botan::PK_Key_Agreement_Options::with_kdf | ( | std::string_view | kdf | ) |
Specify a KDF used to derive the shared key from the agreed value
The salt and desired length passed to derive_key are inputs to this KDF.
The name must not be empty; this cannot be combined with with_raw_shared_key
Definition at line 481 of file pk_options.cpp.
References BOTAN_ARG_CHECK, BOTAN_STATE_CHECK_MSG, and PK_Key_Agreement_Options().
Referenced by Botan::parse_legacy_ka_options(), and ~PK_Key_Agreement_Options().
| PK_Key_Agreement_Options Botan::PK_Key_Agreement_Options::with_provider | ( | std::string_view | provider | ) |
Specify a provider that should be used
This is rarely relevant
Definition at line 501 of file pk_options.cpp.
References BOTAN_STATE_CHECK_MSG, and PK_Key_Agreement_Options().
Referenced by Botan::Private_Key::create_key_agreement_op(), and ~PK_Key_Agreement_Options().
| PK_Key_Agreement_Options Botan::PK_Key_Agreement_Options::with_raw_shared_key | ( | ) |
Request the raw agreed value as the shared key
The agreed value (for example the x coordinate of an elliptic curve point) is not a uniformly random key, so key agreement requires either a KDF or this explicit request; the default options are rejected.
This cannot be combined with with_kdf
Definition at line 492 of file pk_options.cpp.
References BOTAN_STATE_CHECK_MSG, and PK_Key_Agreement_Options().
Referenced by Botan::parse_legacy_ka_options(), and ~PK_Key_Agreement_Options().
|
friend |
Definition at line 391 of file pk_options.h.
References PK_Key_Agreement_Options_Reader.
Referenced by PK_Key_Agreement_Options_Reader.