Struct rs_internal_state::KeccakState
source · pub struct KeccakState<T: Default + Copy> { /* private fields */ }
Expand description
KeccakState<T>
represents the internal state of the Keccak-based permutations with a variable width.
It is used as the foundation for various NIST-validated hash algorithms and other Keccak-based constructions.
This implementation is designed to support multiple widths by varying the T
type parameter, which corresponds to
the following bit widths:
u8
: 200-bit permutationu16
: 400-bit permutationu32
: 800-bit permutationu64
: 1600-bit permutation
The 1600-bit permutation (KeccakState<u64>
) is the basis for the following NIST-validated hash algorithms:
-
SHA-3 family of hash functions:
- SHA3-224
- SHA3-256
- SHA3-384
- SHA3-512
-
Extendable-output functions (XOFs):
- SHAKE128
- SHAKE256
-
RawSHAKE variants:
- RawSHAKE128
- RawSHAKE256
Please note that the NIST-validated hash algorithms are specifically based on the 1600-bit permutation (KeccakState<u64>
).
The other permutations (KeccakState<u8>
, KeccakState<u16>
, and KeccakState<u32>
) can be used for other
Keccak-based constructions or research purposes.
Implementations§
Trait Implementations§
source§impl<T: Clone + Default + Copy> Clone for KeccakState<T>
impl<T: Clone + Default + Copy> Clone for KeccakState<T>
source§fn clone(&self) -> KeccakState<T>
fn clone(&self) -> KeccakState<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: PartialEq + Default + Copy> PartialEq<KeccakState<T>> for KeccakState<T>
impl<T: PartialEq + Default + Copy> PartialEq<KeccakState<T>> for KeccakState<T>
source§fn eq(&self, other: &KeccakState<T>) -> bool
fn eq(&self, other: &KeccakState<T>) -> bool
self
and other
values to be equal, and is used
by ==
.