Botan 2.19.1
Crypto and TLS for C&
|
#include <hkdf.h>
Public Member Functions | |
KDF * | clone () const override |
secure_vector< uint8_t > | derive_key (size_t key_len, const secure_vector< uint8_t > &secret, const std::string &salt="", const std::string &label="") const |
secure_vector< uint8_t > | derive_key (size_t key_len, const secure_vector< uint8_t > &secret, const uint8_t salt[], size_t salt_len, const std::string &label="") const |
template<typename Alloc , typename Alloc2 , typename Alloc3 > | |
secure_vector< uint8_t > | derive_key (size_t key_len, const std::vector< uint8_t, Alloc > &secret, const std::vector< uint8_t, Alloc2 > &salt, const std::vector< uint8_t, Alloc3 > &label) const |
secure_vector< uint8_t > | derive_key (size_t key_len, const uint8_t secret[], size_t secret_len, const std::string &salt="", const std::string &label="") const |
secure_vector< uint8_t > | derive_key (size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[]=nullptr, size_t label_len=0) const |
HKDF_Expand (MessageAuthenticationCode *prf) | |
size_t | kdf (uint8_t key[], size_t key_len, const uint8_t secret[], size_t secret_len, const uint8_t salt[], size_t salt_len, const uint8_t label[], size_t label_len) const override |
std::string | name () const override |
Static Public Member Functions | |
static std::unique_ptr< KDF > | create (const std::string &algo_spec, const std::string &provider="") |
static std::unique_ptr< KDF > | create_or_throw (const std::string &algo_spec, const std::string &provider="") |
static std::vector< std::string > | providers (const std::string &algo_spec) |
|
inlineexplicit |
|
inlineoverridevirtual |
Implements Botan::KDF.
Definition at line 82 of file hkdf.h.
|
staticinherited |
Create an instance based on a name If provider is empty then best available is chosen.
algo_spec | algorithm name |
provider | provider implementation to choose |
Definition at line 69 of file kdf.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_count(), BOTAN_UNUSED, Botan::HashFunction::create(), Botan::MessageAuthenticationCode::create(), and hash.
Referenced by Botan::KDF::create_or_throw(), and Botan::get_kdf().
|
staticinherited |
Create an instance based on a name, or throw if the algo/provider combination cannot be found. If provider is empty then best available is chosen.
Definition at line 226 of file kdf.cpp.
References Botan::KDF::create(), and Botan::KDF::kdf().
Referenced by Botan::ECIES_KA_Operation::derive_secret().
|
inlineinherited |
Derive a key
key_len | the desired output length in bytes |
secret | the secret input |
salt | a diversifier |
label | purpose for the derived keying material |
Definition at line 104 of file kdf.h.
References Botan::cast_char_ptr_to_uint8().
|
inlineinherited |
Derive a key
key_len | the desired output length in bytes |
secret | the secret input |
salt | a diversifier |
salt_len | size of salt in bytes |
label | purpose for the derived keying material |
Definition at line 146 of file kdf.h.
References Botan::cast_char_ptr_to_uint8(), and salt_len.
|
inlineinherited |
Derive a key
key_len | the desired output length in bytes |
secret | the secret input |
salt | a diversifier |
label | purpose for the derived keying material |
Definition at line 126 of file kdf.h.
|
inlineinherited |
Derive a key
key_len | the desired output length in bytes |
secret | the secret input |
secret_len | size of secret in bytes |
salt | a diversifier |
label | purpose for the derived keying material |
Definition at line 168 of file kdf.h.
References Botan::cast_char_ptr_to_uint8().
|
inlineinherited |
Derive a key
key_len | the desired output length in bytes |
secret | the secret input |
secret_len | size of secret in bytes |
salt | a diversifier |
salt_len | size of salt in bytes |
label | purpose for the derived keying material |
label_len | size of label in bytes |
Definition at line 83 of file kdf.h.
References salt_len.
|
overridevirtual |
Derive a key
key | buffer holding the derived key, must be of length key_len |
key_len | the desired output length in bytes |
secret | the secret input |
secret_len | size of secret in bytes |
salt | a diversifier |
salt_len | size of salt in bytes |
label | purpose for the derived keying material |
label_len | size of label in bytes |
Implements Botan::KDF.
Definition at line 51 of file hkdf.cpp.
References Botan::copy_mem(), and salt_len.
Referenced by Botan::hkdf_expand_label(), and Botan::HKDF::kdf().
|
inlineoverridevirtual |
Implements Botan::KDF.
Definition at line 84 of file hkdf.h.
|
staticinherited |