Botan 3.6.1
Crypto and TLS for C&
|
Helper class used to derive secret values based in the pseudorandom key generation described in RFC 8554 Appendix A. More...
#include <hss_lms_utils.h>
Public Member Functions | |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | gen (HashFunction &hash, std::span< const uint8_t > seed) const |
Create a hash value using the preconfigured prefix and a seed . | |
void | gen (std::span< uint8_t > out, HashFunction &hash, std::span< const uint8_t > seed) const |
Create a hash value using the preconfigured prefix and a seed . | |
PseudorandomKeyGeneration (std::span< const uint8_t > identifier) | |
Create a PseudorandomKeyGeneration instance for a fixed identifier . | |
void | set_i (uint16_t i) |
Specify the value for the u16str(i) hash input field. | |
void | set_j (uint8_t j) |
Specify the value for the u8str(j) hash input field. | |
void | set_q (uint32_t q) |
Specify the value for the u32str(q) hash input field. | |
Helper class used to derive secret values based in the pseudorandom key generation described in RFC 8554 Appendix A.
This generation computes the following:
Result = Hash( identifier || u32str(q) || u16str(i) || u8str(j) || SEED )
This Key Generation procedure is also used for the seed derivation function of SECRET_METHOD 2 defined in https://github.com/cisco/hash-sigs,
Definition at line 28 of file hss_lms_utils.h.
Botan::PseudorandomKeyGeneration::PseudorandomKeyGeneration | ( | std::span< const uint8_t > | identifier | ) |
Create a PseudorandomKeyGeneration instance for a fixed identifier
.
Definition at line 18 of file hss_lms_utils.cpp.
References Botan::copy_mem().
|
inline |
Create a hash value using the preconfigured prefix and a seed
.
Definition at line 54 of file hss_lms_utils.h.
References gen(), Botan::Buffered_Computation::output_length(), and T.
Referenced by gen(), and Botan::LMOTS_Private_Key::LMOTS_Private_Key().
void Botan::PseudorandomKeyGeneration::gen | ( | std::span< uint8_t > | out, |
HashFunction & | hash, | ||
std::span< const uint8_t > | seed ) const |
Create a hash value using the preconfigured prefix and a seed
.
Definition at line 26 of file hss_lms_utils.cpp.
References Botan::Buffered_Computation::final(), and Botan::Buffered_Computation::update().
|
inline |
Specify the value for the u16str(i) hash input field.
Definition at line 43 of file hss_lms_utils.h.
References Botan::store_be().
Referenced by Botan::LMOTS_Private_Key::LMOTS_Private_Key().
|
inline |
Specify the value for the u8str(j) hash input field.
Definition at line 48 of file hss_lms_utils.h.
References Botan::store_be().
Referenced by Botan::LMOTS_Private_Key::LMOTS_Private_Key().
|
inline |
Specify the value for the u32str(q) hash input field.
Definition at line 38 of file hss_lms_utils.h.
References Botan::store_be().
Referenced by Botan::LMOTS_Private_Key::LMOTS_Private_Key().