Skip to main content

Crate lib_q_hash

Crate lib_q_hash 

Source
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.
CShake128Hash
Wrapper for cSHAKE128 that implements lib-q-core Hash trait
CShake128Reader
cSHAKE128 XOF reader.
CShake256Hash
Wrapper for cSHAKE256 that implements lib-q-core Hash trait
CShake256Reader
cSHAKE256 XOF reader.
HashContext
Hash context for hash operations
InternalShake128
SHAKE128 hasher.
InternalShake256
SHAKE256 hasher.
InternalShake128Reader
SHAKE128 XOF reader.
InternalShake256Reader
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).
Keccak224Hash
Wrapper for Keccak-224 that implements lib-q-core Hash trait
Keccak256Full
Non-standard 200-byte output Keccak-256 (e.g. CryptoNight-style). Not FIPS SHA3-256—see the crate README.
Keccak256Hash
Wrapper for Keccak-256 that implements lib-q-core Hash trait
Keccak384Hash
Wrapper for Keccak-384 that implements lib-q-core Hash trait
Keccak512Hash
Wrapper for Keccak-512 that implements lib-q-core Hash trait
Kmac128
KMAC128 implementation
Kmac256
KMAC256 implementation
Kmac128Hash
Wrapper for KMAC128 that implements lib-q-core Hash trait
Kmac128Reader
KMAC128 XOF reader
Kmac256Hash
Wrapper for KMAC256 that implements lib-q-core Hash trait
Kmac256Reader
KMAC256 XOF reader
Kt128
KT128 hasher.
Kt256
KT256 hasher.
Kt128Hash
Wrapper for RFC 9861 KT128 (TurboSHAKE128 tree) implementing Hash.
Kt128Reader
KT128 XOF reader.
Kt256Hash
Wrapper for RFC 9861 KT256 (TurboSHAKE256 tree) implementing Hash.
Kt256Reader
KT256 XOF reader.
LibQHashProvider
lib-Q hash provider implementation
ParallelHash128
ParallelHash128 implementation
ParallelHash256
ParallelHash256 implementation
ParallelHash128Hash
Wrapper for ParallelHash128 that implements lib-q-core Hash trait
ParallelHash128Reader
ParallelHash128 XOF reader
ParallelHash256Hash
Wrapper for ParallelHash256 that implements lib-q-core Hash trait
ParallelHash256Reader
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
Sha224Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Sha256Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Sha384Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Sha512Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Sha512_224Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Sha512_256Hash
Fixed-output SHA-2 wrapper for the lib-q Hash trait.
Shake128
SHAKE128 (FIPS 202, extendable output).
Shake256
SHAKE256 (FIPS 202, extendable output).
Shake128Hash
Wrapper for SHAKE128 that implements lib-q-core Hash trait
Shake128Reader
SHAKE128 XOF output reader.
Shake256Hash
Wrapper for SHAKE256 that implements lib-q-core Hash trait
Shake256Reader
SHAKE256 XOF output reader.
TupleHash128
TupleHash128 implementation
TupleHash256
TupleHash256 implementation
TupleHash128Hash
Wrapper for TupleHash128 that implements lib-q-core Hash trait
TupleHash128Reader
TupleHash128 XOF reader
TupleHash256Hash
Wrapper for TupleHash256 that implements lib-q-core Hash trait
TupleHash256Reader
TupleHash256 XOF reader
TurboShake128
TurboSHAKE128 hasher.
TurboShake256
TurboSHAKE256 hasher.
TurboShake128Hash
Wrapper for TurboShake128 that implements lib-q-core Hash trait
TurboShake128Reader
TurboSHAKE128 XOF reader.
TurboShake256Hash
Wrapper for TurboShake256 that implements lib-q-core Hash trait
TurboShake256Reader
TurboSHAKE256 XOF reader.

Enums§

Algorithm
Algorithm identifiers for cryptographic operations
HashAlgorithm
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§

CollisionResistance
Types with a certain collision resistance.
CustomizedInit
Trait for hash functions with customization string for domain separation.
Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
ExtendableOutput
Trait for hash functions with extendable-output (XOF).
ExtendableOutputReset
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 HashContext with this crate’s LibQHashProvider installed.

Type Aliases§

Result
Result type for lib-Q operations