Expand description
lib-Q HASH - Post-quantum Hash Functions
This crate provides implementations of post-quantum hash functions.
Re-exports§
pub use digest;
Structs§
- CShake128
- cSHAKE128 hasher.
- CShake256
- cSHAKE256 hasher.
- CShake128
Hash - Wrapper for cSHAKE128 that implements lib-q-core Hash trait
- CShake128
Reader - cSHAKE128 XOF reader.
- CShake256
Hash - Wrapper for cSHAKE256 that implements lib-q-core Hash trait
- CShake256
Reader - cSHAKE256 XOF reader.
- Hash
Context - Hash context for hash operations
- Internal
Shake128 - SHAKE128 hasher.
- Internal
Shake256 - SHAKE256 hasher.
- Internal
Shake128 Reader - SHAKE128 XOF reader.
- Internal
Shake256 Reader - SHAKE256 XOF reader.
- Keccak224
- Keccak-224 (original Keccak padding, not SHA3-224).
- Keccak256
- Keccak-256 (original Keccak padding, not SHA3-256).
- Keccak384
- Keccak-384 (original Keccak padding, not SHA3-384).
- Keccak512
- Keccak-512 (original Keccak padding, not SHA3-512).
- Keccak224
Hash - Wrapper for Keccak-224 that implements lib-q-core Hash trait
- Keccak256
Full - Non-standard 200-byte output Keccak-256 (e.g. CryptoNight-style). Not FIPS SHA3-256—see the crate README.
- Keccak256
Hash - Wrapper for Keccak-256 that implements lib-q-core Hash trait
- Keccak384
Hash - Wrapper for Keccak-384 that implements lib-q-core Hash trait
- Keccak512
Hash - Wrapper for Keccak-512 that implements lib-q-core Hash trait
- Kmac128
- KMAC128 implementation
- Kmac256
- KMAC256 implementation
- Kmac128
Hash - Wrapper for KMAC128 that implements lib-q-core Hash trait
- Kmac128
Reader - KMAC128 XOF reader
- Kmac256
Hash - Wrapper for KMAC256 that implements lib-q-core Hash trait
- Kmac256
Reader - KMAC256 XOF reader
- Kt128
- KT128 hasher.
- Kt256
- KT256 hasher.
- Kt128
Hash - Wrapper for RFC 9861 KT128 (
TurboSHAKE128tree) implementingHash. - Kt128
Reader - KT128 XOF reader.
- Kt256
Hash - Wrapper for RFC 9861 KT256 (
TurboSHAKE256tree) implementingHash. - Kt256
Reader - KT256 XOF reader.
- LibQ
Hash Provider - lib-Q hash provider implementation
- Parallel
Hash128 - ParallelHash128 implementation
- Parallel
Hash256 - ParallelHash256 implementation
- Parallel
Hash128 Hash - Wrapper for ParallelHash128 that implements lib-q-core Hash trait
- Parallel
Hash128 Reader - ParallelHash128 XOF reader
- Parallel
Hash256 Hash - Wrapper for ParallelHash256 that implements lib-q-core Hash trait
- Parallel
Hash256 Reader - ParallelHash256 XOF reader
- Sha3_
224 - SHA-3-224 (FIPS 202).
- Sha3_
256 - SHA-3-256 (FIPS 202).
- Sha3_
384 - SHA-3-384 (FIPS 202).
- Sha3_
512 - SHA-3-512 (FIPS 202).
- Sha3_
224Hash - Wrapper for SHA3-224 that implements lib-q-core Hash trait
- Sha3_
256Hash - Wrapper for SHA3-256 that implements lib-q-core Hash trait
- Sha3_
384Hash - Wrapper for SHA3-384 that implements lib-q-core Hash trait
- Sha3_
512Hash - Wrapper for SHA3-512 that implements lib-q-core Hash trait
- Sha224
Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Sha256
Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Sha384
Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Sha512
Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Sha512_
224Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Sha512_
256Hash - Fixed-output SHA-2 wrapper for the lib-q
Hashtrait. - Shake128
- SHAKE128 (FIPS 202, extendable output).
- Shake256
- SHAKE256 (FIPS 202, extendable output).
- Shake128
Hash - Wrapper for SHAKE128 that implements lib-q-core Hash trait
- Shake128
Reader - SHAKE128 XOF output reader.
- Shake256
Hash - Wrapper for SHAKE256 that implements lib-q-core Hash trait
- Shake256
Reader - SHAKE256 XOF output reader.
- Tuple
Hash128 - TupleHash128 implementation
- Tuple
Hash256 - TupleHash256 implementation
- Tuple
Hash128 Hash - Wrapper for TupleHash128 that implements lib-q-core Hash trait
- Tuple
Hash128 Reader - TupleHash128 XOF reader
- Tuple
Hash256 Hash - Wrapper for TupleHash256 that implements lib-q-core Hash trait
- Tuple
Hash256 Reader - TupleHash256 XOF reader
- Turbo
Shake128 - TurboSHAKE128 hasher.
- Turbo
Shake256 - TurboSHAKE256 hasher.
- Turbo
Shake128 Hash - Wrapper for TurboShake128 that implements lib-q-core Hash trait
- Turbo
Shake128 Reader - TurboSHAKE128 XOF reader.
- Turbo
Shake256 Hash - Wrapper for TurboShake256 that implements lib-q-core Hash trait
- Turbo
Shake256 Reader - TurboSHAKE256 XOF reader.
Enums§
- Algorithm
- Algorithm identifiers for cryptographic operations
- Hash
Algorithm - Hash algorithm types that map to lib-q-core Algorithm enum
Constants§
- CSHAKE_
PAD - cSHAKE padding value
- DEFAULT_
ROUND_ COUNT - Default number of rounds for Keccak permutation
- KECCAK_
PAD - Keccak padding value
- MAX_
SP800185_ FIXED_ OUTPUT_ BYTES - Maximum fixed output length (bytes) for SP 800-185 helpers in this crate (KMAC, TupleHash, ParallelHash).
- PLEN
- Length of the Keccak state array
- SHA3_
PAD - SHA-3 padding value
- SHAKE_
PAD - SHAKE padding value
Traits§
- Collision
Resistance - Types with a certain collision resistance.
- Customized
Init - Trait for hash functions with customization string for domain separation.
- Digest
- Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
- Extendable
Output - Trait for hash functions with extendable-output (XOF).
- Extendable
Output Reset - Trait for hash functions with extendable-output (XOF) able to reset themselves.
- Hash
- Trait for hash functions
- Update
- Types which consume data with byte granularity.
Functions§
- algorithm_
to_ hash_ algorithm - Map lib-q-core Algorithm to HashAlgorithm
- available_
algorithms - Get available hash algorithms
- create_
hash - Create a hash instance by HashAlgorithm enum
- create_
hash_ context - Create a
HashContextwith this crate’sLibQHashProviderinstalled.
Type Aliases§
- Result
- Result type for lib-Q operations