|
Botan 3.14.1
Crypto and TLS for C&
|
#include <hpke.h>
Public Member Functions | |
| constexpr KEM_Code | code () const |
| size_t | encapsulation_length () const |
| Return the constant Nenc from RFC 9180 Section 7.1, throws for invalid code points. | |
| bool | is_available () const |
| True if the algorithms this KEM requires are available in this build. | |
| constexpr bool | is_dhkem () const |
| constexpr bool | is_known () const |
| True if this codepoint is known to this version of the library. | |
| constexpr | KEM_Id (KEM_Code code) |
| constexpr | KEM_Id (uint16_t code) |
| constexpr bool | operator== (const KEM_Id &other) const |
| constexpr bool | operator== (KEM_Code code) const |
| size_t | private_key_length () const |
| Return the constant Nsk from RFC 9180 Section 7.1, throws for invalid code points. | |
| size_t | public_key_length () const |
| Return the constant Npk from RFC 9180 Section 7.1, throws for invalid code points. | |
| size_t | shared_secret_length () const |
| Return the constant Nsecret from RFC 9180 Section 7.1, throws for invalid code points. | |
| constexpr bool | supports_auth_modes () const |
| std::optional< std::string > | to_string () const |
| Returns std::nullopt for unknown codepoints. | |
| constexpr uint16_t | wire_code () const |
Identifies the KEM used by an HPKE ciphersuite
This may hold any 16-bit codepoint, including values unknown to the library (as may be encountered eg when parsing an ECHConfigList); is_known() and is_available() distinguish what can actually be used.
|
inlineconstexpr |
Definition at line 77 of file hpke.h.
References code().
Referenced by operator==().
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 83 of file hpke.h.
Referenced by Botan::HPKE::KEM_Ops::create(), KEM_Id(), KEM_Id(), and operator==().
| size_t Botan::HPKE::KEM_Id::encapsulation_length | ( | ) | const |
| bool Botan::HPKE::KEM_Id::is_available | ( | ) | const |
True if the algorithms this KEM requires are available in this build.
Definition at line 119 of file hpke.cpp.
References Botan::HPKE::KEM_Ops::create().
|
inlineconstexpr |
Definition at line 107 of file hpke.h.
References Botan::HPKE::DHKEM_P256, Botan::HPKE::DHKEM_P384, Botan::HPKE::DHKEM_P521, Botan::HPKE::DHKEM_X25519, and Botan::HPKE::DHKEM_X448.
Referenced by supports_auth_modes().
|
inlineconstexpr |
True if this codepoint is known to this version of the library.
Definition at line 92 of file hpke.h.
References Botan::HPKE::DHKEM_P256, Botan::HPKE::DHKEM_P384, Botan::HPKE::DHKEM_P521, Botan::HPKE::DHKEM_X25519, and Botan::HPKE::DHKEM_X448.
|
inlineconstexpr |
|
inlineconstexpr |
| size_t Botan::HPKE::KEM_Id::private_key_length | ( | ) | const |
| size_t Botan::HPKE::KEM_Id::public_key_length | ( | ) | const |
| size_t Botan::HPKE::KEM_Id::shared_secret_length | ( | ) | const |
|
inlineconstexpr |
Only the DH-based KEMs support the Auth and AuthPSK modes See RFC 9180 Section 7.1
Definition at line 115 of file hpke.h.
References is_dhkem().
| std::optional< std::string > Botan::HPKE::KEM_Id::to_string | ( | ) | const |
|
inlineconstexpr |