Botan 3.6.1
Crypto and TLS for C&
|
#include <sp_hash_shake.h>
Public Member Functions | |
std::tuple< SphincsHashedMessage, XmssTreeIndexInLayer, TreeNodeIndex > | H_msg (StrongSpan< const SphincsMessageRandomness > r, const SphincsTreeNode &root, const SphincsMessageInternal &message) |
std::string | msg_hash_function_name () const override |
void | PRF (StrongSpan< ForsLeafSecret > out, const SphincsSecretSeed &sk_seed, const Sphincs_Address &address) |
void | PRF (StrongSpan< WotsNode > out, const SphincsSecretSeed &sk_seed, const Sphincs_Address &address) |
void | PRF_msg (StrongSpan< SphincsMessageRandomness > out, StrongSpan< const SphincsSecretPRF > sk_prf, StrongSpan< const SphincsOptionalRandomness > opt_rand, const SphincsMessageInternal &msg) override |
Sphincs_Hash_Functions_Shake (const Sphincs_Parameters &sphincs_params, const SphincsPublicSeed &pub_seed) | |
template<typename OutT = std::vector<uint8_t>, typename... BufferTs> | |
OutT | T (const Sphincs_Address &address, BufferTs &&... in) |
template<typename... BufferTs> | |
void | T (std::span< uint8_t > out, const Sphincs_Address &address, BufferTs &&... in) |
Static Public Member Functions | |
static std::unique_ptr< Sphincs_Hash_Functions > | create (const Sphincs_Parameters &sphincs_params, const SphincsPublicSeed &pub_seed) |
Protected Attributes | |
const SphincsPublicSeed & | m_pub_seed |
const Sphincs_Parameters & | m_sphincs_params |
Implementation of SLH-DSA hash function abstraction for SHAKE256
Definition at line 21 of file sp_hash_shake.h.
|
inline |
Definition at line 43 of file sp_hash_shake.h.
References Botan::Sphincs_Hash_Functions::m_pub_seed, and Botan::Buffered_Computation::update().
|
staticinherited |
Creates a Sphincs_Hash_Functions object instantiating the hash functions used for the specified sphincs_params
. The pub_seed
is used to seed the hash functions (possibly padded). This is pre-computed and the respective state is copied on the further calls on H(seed) with tweak_hash, i.e., T and PRF.
Definition at line 34 of file sp_hash.cpp.
References BOTAN_ASSERT_UNREACHABLE, Botan::Haraka, Botan::Sphincs_Parameters::hash_type(), Botan::Sha256, and Botan::Shake256.
Referenced by Botan::SphincsPlus_PrivateKey::SphincsPlus_PrivateKey().
|
inherited |
Definition at line 78 of file sp_hash.cpp.
References BOTAN_ASSERT_NOMSG, Botan::BufferSlicer::copy(), Botan::BufferSlicer::empty(), Botan::Sphincs_Hash_Functions::H_msg_digest(), Botan::Sphincs_Hash_Functions::m_sphincs_params, Botan::root(), and Botan::BufferSlicer::take().
|
inlineoverridevirtual |
Implements Botan::Sphincs_Hash_Functions.
Definition at line 62 of file sp_hash_shake.h.
References Botan::SHAKE_256::name().
|
inlineinherited |
Definition at line 70 of file sp_hash.h.
References T.
Referenced by Botan::fors_sign_and_pkgen(), and Botan::wots_sign_and_pkgen().
|
inlineinherited |
|
inlineoverridevirtual |
Using SK.PRF, the optional randomness, and a message, computes the message random R, and the tree and leaf indices.
out | output location for the message hash |
sk_prf | SK.PRF |
opt_rand | optional randomness |
msg | message |
Implements Botan::Sphincs_Hash_Functions.
Definition at line 51 of file sp_hash_shake.h.
References Botan::Buffered_Computation::final(), Botan::SphincsMessageInternal::message, Botan::SphincsMessageInternal::prefix, and Botan::Buffered_Computation::update().
|
inlineinherited |
|
inlineinherited |
Definition at line 57 of file sp_hash.h.
Referenced by Botan::compute_root(), Botan::fors_public_key_from_signature(), Botan::fors_sign_and_pkgen(), Botan::ht_verify(), Botan::treehash(), and Botan::wots_sign_and_pkgen().
|
protectedinherited |
Definition at line 103 of file sp_hash.h.
Referenced by Sphincs_Hash_Functions_Shake().
|
protectedinherited |
Definition at line 102 of file sp_hash.h.
Referenced by Botan::Sphincs_Hash_Functions::H_msg().