Expand description
Utilities for hash circuit examples
Structs§
- Hasher
Instance - Instance (witness) parameters shared by every hasher example.
- Hasher
Params - Circuit-shape parameters shared by every hasher example.
Enums§
- Hasher
Mode - The gadget shape selected by
HasherParams.
Constants§
- DEFAULT_
HASH_ MESSAGE_ BYTES - Default message size for hash circuit examples (1 KiB)
- DEFAULT_
RANDOM_ SEED - Standard seed for reproducible random message generation
Functions§
- hasher_
param_ summary - One-line summary of the circuit shape selected by
HasherParams, for stat output. - pack_
bytes_ u32words - Pack message bytes into 32-bit words, one word per wire with the high 32 bits zero.
- pack_
bytes_ u64words - Pack message bytes into 64-bit words, one word per wire.
- resolve_
hasher_ message - Resolve a
HasherInstanceinto the concrete message bytes to hash, validated againstmode. - resolve_
hasher_ mode - Resolve
HasherParamsinto the gadget shape the circuit should be built from.