|
Botan 3.13.0
Crypto and TLS for C&
|
#include <shake_xof.h>
Public Member Functions | |
| bool | accepts_input () const final |
| size_t | block_size () const final |
| void | clear () |
| std::unique_ptr< XOF > | copy_state () const final |
| virtual Key_Length_Specification | key_spec () const |
| std::string | name () const final |
| std::unique_ptr< XOF > | new_object () const final |
| 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) |
| std::string | provider () const final |
| SHAKE_128_XOF () | |
| void | start (std::span< const uint8_t > salt={}, std::span< const uint8_t > key={}) |
| void | update (std::span< const uint8_t > input) |
| virtual bool | valid_salt_length (size_t salt_len) const |
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) |
SHAKE-128 as defined in FIPS Pub.202 Section 6.2
Definition at line 50 of file shake_xof.h.
|
inline |
Definition at line 52 of file shake_xof.h.
References Botan::SHAKE_XOF::SHAKE_XOF().
|
inlinefinalvirtualinherited |
Typically, this is true for new objects and becomes false once output() was called for the first time.
Implements Botan::XOF.
Definition at line 35 of file shake_xof.h.
|
inlinefinalvirtualinherited |
Return the internal block size of this XOF
Implements Botan::XOF.
Definition at line 33 of file shake_xof.h.
|
inlineinherited |
Reset the state.
Definition at line 66 of file xof.h.
Referenced by Botan::Kyber_90s_Symmetric_Primitives::init_PRF(), Botan::Kyber_Modern_Symmetric_Primitives::init_PRF(), Botan::ML_KEM_Symmetric_Primitives::init_PRF(), Botan::Kyber_90s_Symmetric_Primitives::init_XOF(), Botan::Kyber_Modern_Symmetric_Primitives::init_XOF(), and Botan::ML_KEM_Symmetric_Primitives::init_XOF().
|
inlinefinalvirtual |
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 56 of file shake_xof.h.
|
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 28 of file xof.cpp.
References Botan::SCAN_Name::algo_name(), Botan::SCAN_Name::arg_count(), and provider().
Referenced by botan_xof_init(), 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 54 of file xof.cpp.
References create(), and provider().
Referenced by Botan::AES_256_CTR_XOF::AES_256_CTR_XOF(), Botan::create_pk_from_sk(), Botan::Kyber_Modern_Symmetric_Primitives::create_PRF(), Botan::ML_KEM_Symmetric_Primitives::create_PRF(), Botan::Kyber_Modern_Symmetric_Primitives::create_XOF(), Botan::ML_KEM_Symmetric_Primitives::create_XOF(), Botan::Dilithium_Symmetric_Primitives_Base::H(), Botan::Dilithium_Symmetric_Primitives_Base::H(), Botan::Dilithium_Symmetric_Primitives_Base::H_256(), Botan::Classic_McEliece_Parameters::prg(), Botan::sign_message(), and ~XOF().
|
inlinevirtualinherited |
Return the key lengths supported by this XOF
Reimplemented in Botan::AES_256_CTR_XOF.
Definition at line 102 of file xof.h.
Referenced by start().
|
inlinefinalvirtual |
Return the name of this XOF
Implements Botan::XOF.
Definition at line 54 of file shake_xof.h.
|
inlinefinalvirtual |
Create a new uninitialized object of the same type
Implements Botan::XOF.
Definition at line 58 of file shake_xof.h.
|
inlineinherited |
|
inlineinherited |
Generate output bytes into a newly allocated container
bytes output bytes as the specified container type T. Definition at line 161 of file xof.h.
Referenced by Botan::FrodoMatrix::make_sample_generator(), output(), and output_stdvec().
|
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 184 of file xof.h.
References output().
|
inlinefinalvirtualinherited |
Return the name of the provider implementing this object
Reimplemented from Botan::XOF.
Definition at line 31 of file shake_xof.h.
|
staticinherited |
List the providers available for a given XOF
| algo_spec | algorithm name |
Definition at line 62 of file xof.cpp.
References Botan::probe_providers_of().
Referenced by ~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 70 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 147 of file xof.h.
References start().
Referenced by Botan::Kyber_Modern_Symmetric_Primitives::init_PRF(), Botan::ML_KEM_Symmetric_Primitives::init_PRF(), Botan::Kyber_Modern_Symmetric_Primitives::init_XOF(), and Botan::ML_KEM_Symmetric_Primitives::init_XOF().
|
inlinevirtualinherited |
Test if a salt length is valid for this XOF
Reimplemented in Botan::AES_256_CTR_XOF, and Botan::cSHAKE_XOF.
Definition at line 93 of file xof.h.
Referenced by start().