|
Botan 3.14.1
Crypto and TLS for C&
|
Namespaces | |
| namespace | detail |
Classes | |
| class | AEAD_Id |
| class | KDF_Id |
| class | KEM_Id |
| class | KEM_Ops |
| class | Private_Key |
| class | PSK |
| class | Public_Key |
| class | Recipient_Context |
| class | Sender_Context |
| class | Suite |
Enumerations | |
| enum class | AEAD_Code : uint16_t { AES_128_GCM = 0x0001 , AES_256_GCM = 0x0002 , ChaCha20Poly1305 = 0x0003 , ExportOnly = 0xFFFF } |
| enum class | KDF_Code : uint16_t { HKDF_SHA256 = 0x0001 , HKDF_SHA384 = 0x0002 , HKDF_SHA512 = 0x0003 } |
| enum class | KEM_Code : uint16_t { DHKEM_P256 = 0x0010 , DHKEM_P384 = 0x0011 , DHKEM_P521 = 0x0012 , DHKEM_X25519 = 0x0020 , DHKEM_X448 = 0x0021 } |
| enum class | Mode : uint8_t { Base = 0x00 , PSK = 0x01 , Auth = 0x02 , AuthPSK = 0x03 } |
| The four HPKE modes, with their codepoints from RFC 9180 Section 5. More... | |
Functions | |
| secure_vector< uint8_t > | labeled_expand (std::string_view hash, std::span< const uint8_t > suite_id, std::span< const uint8_t > prk, std::string_view label, std::span< const uint8_t > info, size_t length) |
| secure_vector< uint8_t > | labeled_extract (std::string_view hash, std::span< const uint8_t > suite_id, std::span< const uint8_t > salt, std::string_view label, std::span< const uint8_t > ikm) |
|
strong |
HPKE AEAD identifiers (RFC 9180 Section 7.3)
| Enumerator | |
|---|---|
| AES_128_GCM | |
| AES_256_GCM | |
| ChaCha20Poly1305 | |
| ExportOnly | |
Definition at line 58 of file hpke.h.
|
strong |
HPKE KDF identifiers (RFC 9180 Section 7.2)
| Enumerator | |
|---|---|
| HKDF_SHA256 | |
| HKDF_SHA384 | |
| HKDF_SHA512 | |
Definition at line 49 of file hpke.h.
|
strong |
|
strong |
| BOTAN_TEST_API secure_vector< uint8_t > Botan::HPKE::labeled_expand | ( | std::string_view | hash, |
| std::span< const uint8_t > | suite_id, | ||
| std::span< const uint8_t > | prk, | ||
| std::string_view | label, | ||
| std::span< const uint8_t > | info, | ||
| size_t | length ) |
LabeledExpand from RFC 9180 Section 4
Definition at line 65 of file hpke_kem.cpp.
References Botan::as_span_of_bytes(), BOTAN_ARG_CHECK, Botan::concat(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::KDF::derive_key(), Botan::fmt(), and Botan::store_be().
| BOTAN_TEST_API secure_vector< uint8_t > Botan::HPKE::labeled_extract | ( | std::string_view | hash, |
| std::span< const uint8_t > | suite_id, | ||
| std::span< const uint8_t > | salt, | ||
| std::string_view | label, | ||
| std::span< const uint8_t > | ikm ) |
LabeledExtract from RFC 9180 Section 4
hash is a Botan hash function name eg "SHA-256"; suite_id is either the KEM suite_id ("KEM" || kem_id) or the full HPKE suite_id ("HPKE" || kem_id || kdf_id || aead_id) depending on the caller.
Definition at line 49 of file hpke_kem.cpp.
References Botan::as_span_of_bytes(), Botan::concat(), Botan::MessageAuthenticationCode::create_or_throw(), Botan::KDF::derive_key(), and Botan::fmt().