|
Botan 3.14.1
Crypto and TLS for C&
|
#include <pk_options.h>
Public Member Functions | |
| PK_KEM_Options & | operator= (const PK_KEM_Options &other)=default |
| PK_KEM_Options & | operator= (PK_KEM_Options &&other)=default |
| PK_KEM_Options ()=default | |
| PK_KEM_Options (const PK_KEM_Options &)=default | |
| PK_KEM_Options (PK_KEM_Options &&other)=default | |
| std::string | to_string () const |
| PK_KEM_Options | with_kdf (std::string_view kdf) |
| PK_KEM_Options | with_provider (std::string_view provider) |
| PK_KEM_Options | with_raw_shared_key () |
| ~PK_KEM_Options () | |
Friends | |
| class | PK_KEM_Options_Reader |
Key encapsulation options
The normal usage of this is in a builder style, eg
PK_KEM_Options().with_kdf("HKDF(SHA-256)")
As with PK_Signature_Options, every option that is set must be understood by the KEM in use; constructing the PK_KEM_Encryptor or PK_KEM_Decryptor throws an exception otherwise.
Definition at line 292 of file pk_options.h.
|
default |
Referenced by operator=(), operator=(), PK_KEM_Options(), PK_KEM_Options(), with_kdf(), with_provider(), with_raw_shared_key(), and ~PK_KEM_Options().
|
default |
References PK_KEM_Options().
|
default |
References PK_KEM_Options().
|
default |
References PK_KEM_Options(), to_string(), with_kdf(), with_provider(), and with_raw_shared_key().
|
default |
References PK_KEM_Options().
|
default |
References PK_KEM_Options().
| std::string Botan::PK_KEM_Options::to_string | ( | ) | const |
Format this PK_KEM_Options as a string
This is primarily intended for debugging and error messages; the format is not fixed
Definition at line 461 of file pk_options.cpp.
Referenced by ~PK_KEM_Options().
| PK_KEM_Options Botan::PK_KEM_Options::with_kdf | ( | std::string_view | kdf | ) |
Specify a KDF used to derive the shared key from the KEM output
The salt and desired length passed to the encrypt/decrypt operations are inputs to this KDF.
The name must not be empty; this cannot be combined with with_raw_shared_key
Definition at line 397 of file pk_options.cpp.
References BOTAN_ARG_CHECK, BOTAN_STATE_CHECK_MSG, and PK_KEM_Options().
Referenced by Botan::parse_legacy_kem_options(), and ~PK_KEM_Options().
| PK_KEM_Options Botan::PK_KEM_Options::with_provider | ( | std::string_view | provider | ) |
Specify a provider that should be used
This is rarely relevant
Definition at line 415 of file pk_options.cpp.
References BOTAN_STATE_CHECK_MSG, and PK_KEM_Options().
Referenced by Botan::Private_Key::create_kem_decryption_op(), Botan::Public_Key::create_kem_encryption_op(), and ~PK_KEM_Options().
| PK_KEM_Options Botan::PK_KEM_Options::with_raw_shared_key | ( | ) |
Request the raw output of the KEM as the shared key
If neither this nor with_kdf is used, KEMs whose output is already a uniformly random key (for example ML-KEM) return that output directly, while KEMs whose output is not (for example RSA-KEM or a key agreement used as a KEM) reject the request.
This cannot be combined with with_kdf
Definition at line 407 of file pk_options.cpp.
References BOTAN_STATE_CHECK_MSG, and PK_KEM_Options().
Referenced by Botan::parse_legacy_kem_options(), and ~PK_KEM_Options().
|
friend |
Definition at line 333 of file pk_options.h.
References PK_KEM_Options_Reader.
Referenced by PK_KEM_Options_Reader.