Botan 3.9.0
Crypto and TLS for C&
|
#include <aes_crystals_xof.h>
Public Member Functions | |
bool | accepts_input () const override |
AES_256_CTR_XOF () | |
size_t | block_size () const override |
void | clear () |
std::unique_ptr< XOF > | copy_state () const override |
Key_Length_Specification | key_spec () const override |
std::string | name () const override |
std::unique_ptr< XOF > | new_object () const override |
template<size_t count> | |
std::array< uint8_t, count > | output () |
template<concepts::resizable_byte_buffer T = secure_vector<uint8_t>> | |
T | output (size_t bytes) |
void | output (std::span< uint8_t > output) |
uint8_t | output_next_byte () |
std::vector< uint8_t > | output_stdvec (size_t bytes) |
virtual std::string | provider () const |
void | reset () override |
void | start (std::span< const uint8_t > salt={}, std::span< const uint8_t > key={}) |
void | update (std::span< const uint8_t > input) |
bool | valid_salt_length (size_t iv_length) const override |
~AES_256_CTR_XOF () override |
Static Public Member Functions | |
static std::unique_ptr< XOF > | create (std::string_view algo_spec, std::string_view provider="") |
static std::unique_ptr< XOF > | create_or_throw (std::string_view algo_spec, std::string_view provider="") |
static std::vector< std::string > | providers (std::string_view algo_spec) |
XOF implementation for Kyber/Dilithium 90s-modes based on AES-256 in counter mode.
This is an internal class that is not meant for consumption by library users. It is therefore not registered in XOF::create().
Definition at line 26 of file aes_crystals_xof.h.
Botan::AES_256_CTR_XOF::AES_256_CTR_XOF | ( | ) |
Definition at line 17 of file aes_crystals_xof.cpp.
References Botan::XOF::create_or_throw(), and name().
|
overridedefault |
References reset().
|
inlineoverridevirtual |
Typically, this is true for new objects and becomes false once output() was called for the first time.
Implements Botan::XOF.
Definition at line 47 of file aes_crystals_xof.h.
|
inlineoverridevirtual |
Implements Botan::XOF.
Definition at line 41 of file aes_crystals_xof.h.
|
inlineinherited |
Reset the state.
Definition at line 64 of file xof.h.
Referenced by Botan::Kyber_90s_Symmetric_Primitives::get_PRF(), Botan::Kyber_Modern_Symmetric_Primitives::get_PRF(), Botan::ML_KEM_Symmetric_Primitives::get_PRF(), Botan::Kyber_90s_Symmetric_Primitives::get_XOF(), Botan::Kyber_Modern_Symmetric_Primitives::get_XOF(), Botan::ML_KEM_Symmetric_Primitives::get_XOF(), and Botan::Dilithium_Symmetric_Primitives_Base::H().
|
overridevirtual |
Return a new XOF object with the same state as *this.
If the XOF is not yet in the output phase, it efficiently allows using several messages with a common prefix. Otherwise, the copied state will produce the same output bit stream as the original object at the time of this invocation.
This function should be called clone but for consistency with other classes it is called copy_state.
Implements Botan::XOF.
Definition at line 38 of file aes_crystals_xof.cpp.
References Botan::fmt(), and name().
|
staticinherited |
Create an instance based on a name, or return null if the algo/provider combination cannot be found. If provider is empty then best available is chosen.
Definition at line 24 of file xof.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg_count(), and provider().
Referenced by create_or_throw(), and ~XOF().
|
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 use Throws Lookup_Error if not found. |
Definition at line 44 of file xof.cpp.
References create(), and provider().
Referenced by Botan::AES_256_CTR_XOF::AES_256_CTR_XOF(), Botan::Classic_McEliece_Parameters::prg(), and ~XOF().
|
overridevirtual |
Reimplemented from Botan::XOF.
Definition at line 34 of file aes_crystals_xof.cpp.
|
inlineoverridevirtual |
Implements Botan::XOF.
Definition at line 33 of file aes_crystals_xof.h.
Referenced by AES_256_CTR_XOF(), and copy_state().
|
inlineoverridevirtual |
Implements Botan::XOF.
Definition at line 45 of file aes_crystals_xof.h.
|
inlineinherited |
|
inlineinherited |
bytes
output bytes as the specified container type T
. Definition at line 153 of file xof.h.
Referenced by Botan::FrodoMatrix::make_sample_generator(), output(), output_stdvec(), and Botan::Kyber_Symmetric_Primitives::PRF().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Convenience overload to generate a std::vector<uint8_t>. Same as calling XOF::output<std::vector<uint8_t>>().
bytes
output bytes as a byte vector. Definition at line 175 of file xof.h.
References output().
|
virtualinherited |
Reimplemented in Botan::cSHAKE_XOF, and Botan::SHAKE_XOF.
Definition at line 56 of file xof.cpp.
Referenced by create(), create_or_throw(), and ~XOF().
|
staticinherited |
algo_spec | algorithm name |
Definition at line 52 of file xof.cpp.
References Botan::probe_providers_of().
Referenced by ~XOF().
|
overridevirtual |
Clear the XOF's internal state and allow for new input.
Implements Botan::XOF.
Definition at line 21 of file aes_crystals_xof.cpp.
Referenced by ~AES_256_CTR_XOF().
|
inherited |
Some XOFs can be parameterized with a salt
and/or key
. If required, this must be called before calling XOF::update().
Definition at line 60 of file xof.cpp.
References Botan::fmt(), key_spec(), name(), and valid_salt_length().
|
inlineinherited |
Add input
data to the XOF's internal state
input | the data that shall be |
Definition at line 140 of file xof.h.
References start().
|
overridevirtual |
Checks that the given iv_length
is compatible with this XOF
Reimplemented from Botan::XOF.
Definition at line 30 of file aes_crystals_xof.cpp.