Botan 3.6.1
Crypto and TLS for C&
|
#include <dilithium_symmetric_primitives.h>
Static Public Member Functions | |
static std::unique_ptr< Dilithium_Symmetric_Primitives_Base > | create (const DilithiumConstants &mode) |
Protected Member Functions | |
Dilithium_Symmetric_Primitives_Base (const DilithiumConstants &mode, std::unique_ptr< DilithiumXOF > xof_adapter) | |
template<concepts::resizable_byte_buffer OutT, ranges::spanable_range... InTs> | |
OutT | H_256 (size_t outbytes, InTs &&... ins) const |
virtual std::optional< std::array< uint8_t, 2 > > | seed_expansion_domain_separator () const =0 |
virtual StrongSpan< const DilithiumCommitmentHash > | truncate_commitment_hash (StrongSpan< const DilithiumCommitmentHash > seed) const =0 |
Adapter class that uses polymorphy to distinguish Dilithium "common" from Dilithium "AES" modes.
Definition at line 101 of file dilithium_symmetric_primitives.h.
|
inlineprotected |
Definition at line 103 of file dilithium_symmetric_primitives.h.
|
virtualdefault |
|
delete |
|
delete |
|
static |
Definition at line 28 of file dilithium_symmetric_primitives.cpp.
References Botan::DilithiumConstants::is_aes(), Botan::DilithiumConstants::is_ml_dsa(), and Botan::DilithiumConstants::is_modern().
Referenced by Botan::DilithiumConstants::DilithiumConstants().
|
inlinevirtual |
Reimplemented in Botan::ML_DSA_Symmetric_Primitives.
Definition at line 118 of file dilithium_symmetric_primitives.h.
|
inline |
Definition at line 156 of file dilithium_symmetric_primitives.h.
References Botan::XOF::clear(), truncate_commitment_hash(), and Botan::XOF::update().
|
inline |
Definition at line 151 of file dilithium_symmetric_primitives.h.
References H_256().
|
inline |
Definition at line 133 of file dilithium_symmetric_primitives.h.
References Botan::XOF::clear(), Botan::XOF::output(), Botan::rho(), seed_expansion_domain_separator(), Botan::DilithiumConstants::SEED_RHO_BYTES, Botan::DilithiumConstants::SEED_RHOPRIME_BYTES, Botan::DilithiumConstants::SEED_SIGNING_KEY_BYTES, and Botan::XOF::update().
|
inline |
Definition at line 164 of file dilithium_symmetric_primitives.h.
|
inline |
Definition at line 170 of file dilithium_symmetric_primitives.h.
|
inline |
Definition at line 129 of file dilithium_symmetric_primitives.h.
References H_256().
Referenced by Botan::Dilithium_Algos::expand_mask(), and Botan::Dilithium_Algos::sample_in_ball().
|
inlineprotected |
Definition at line 191 of file dilithium_symmetric_primitives.h.
References Botan::XOF::clear(), Botan::XOF::output(), and Botan::XOF::update().
|
pure virtual |
Computes the private random seed rho prime used for signing if a rng
is given, the seed is randomized
Implemented in Botan::Dilithium_Round3_Symmetric_Primitives, and Botan::ML_DSA_Symmetric_Primitives.
|
delete |
|
delete |
|
protectedpure virtual |
Creates the domain separator for the initial seed expansion. The return value may be std::nullopt meaning that no domain separation is required (for Dilithium).
Implemented in Botan::Dilithium_Round3_Symmetric_Primitives, and Botan::ML_DSA_Symmetric_Primitives.
Referenced by H().
|
protectedpure virtual |
Implemented by the derived classes to truncate the commitment hash to the correct length. This is a customization point to enable support for the final ML-DSA standard.
Implemented in Botan::Dilithium_Round3_Symmetric_Primitives, and Botan::ML_DSA_Symmetric_Primitives.
Referenced by H().