Skip to main content

Module utils

Module utils 

Source
Expand description

Utilities for hash circuit examples

Structs§

HasherInstance
Instance (witness) parameters shared by every hasher example.
HasherParams
Circuit-shape parameters shared by every hasher example.

Enums§

HasherMode
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 HasherInstance into the concrete message bytes to hash, validated against mode.
resolve_hasher_mode
Resolve HasherParams into the gadget shape the circuit should be built from.