|
std::tuple< SphincsHashedMessage, XmssTreeIndexInLayer, TreeNodeIndex > | H_msg (StrongSpan< const SphincsMessageRandomness > r, const SphincsTreeNode &root, const SphincsMessageInternal &message) |
|
virtual std::string | msg_hash_function_name () const =0 |
|
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) |
|
virtual void | PRF_msg (StrongSpan< SphincsMessageRandomness > out, StrongSpan< const SphincsSecretPRF > sk_prf, StrongSpan< const SphincsOptionalRandomness > opt_rand, const SphincsMessageInternal &msg)=0 |
|
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) |
|
virtual | ~Sphincs_Hash_Functions ()=default |
|
A collection of pseudorandom hash functions required for SLH-DSA computations. See FIPS 205, Section 11.2.1 and 11.2.2.
Definition at line 23 of file sp_hash.h.
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.
35 {
36 switch(sphincs_params.hash_type()) {
38#if defined(BOTAN_HAS_SPHINCS_PLUS_SHA2_BASE)
39 return std::make_unique<Sphincs_Hash_Functions_Sha2>(sphincs_params, pub_seed);
40#else
41 throw Not_Implemented("SLH-DSA (or SPHINCS+) with SHA-256 is not available in this build");
42#endif
43
45#if defined(BOTAN_HAS_SPHINCS_PLUS_SHAKE_BASE)
46 return std::make_unique<Sphincs_Hash_Functions_Shake>(sphincs_params, pub_seed);
47#else
48 throw Not_Implemented("SLH-DSA (or SPHINCS+) with SHAKE is not available in this build");
49#endif
50
52 throw Not_Implemented("Haraka is not implemented");
53 }
55}
#define BOTAN_ASSERT_UNREACHABLE()
@ Haraka
Haraka is currently not supported.
References BOTAN_ASSERT_UNREACHABLE, Botan::Haraka, Botan::Sphincs_Parameters::hash_type(), Botan::Sha256, and Botan::Shake256.
Referenced by Botan::SphincsPlus_PrivateKey::SphincsPlus_PrivateKey().