Expand description
A crate for the cryptographic sponge trait.
Modules§
- constraints
- Infrastructure for the constraints counterparts.
- poseidon
- The sponge for Poseidon
Macros§
- absorb
- Individually absorbs each element in a comma-separated list of absorbables into a sponge.
Format is
absorb!(s, a_0, a_1, ..., a_n), wheresis a mutable reference to a sponge and eacha_iimplementsAbsorb. - absorb_
gadget - Individually absorbs each element in a comma-separated list of [
Absorbable]s into a sponge. Format isabsorb!(s, a_0, a_1, ..., a_n), wheresis a mutable reference to a sponge and eacha_iimplementsAbsorbableVar. - collect_
sponge_ bytes - Quickly convert a list of different
Absorbs into sponge bytes. - collect_
sponge_ field_ elements - Quickly convert a list of different
Absorbs into sponge field elements. - collect_
sponge_ field_ elements_ gadget - Quickly convert a list of different [
Absorbable]s into sponge field elements.
Enums§
- Field
Element Size - An enum for specifying the output field element size.
Traits§
- Absorb
- An interface for objects that can be absorbed by a
CryptographicSponge. - Absorb
With Length - An extension to
Absorbthat is specific to items with variable length, such as a list. - Cryptographic
Sponge - The interface for a cryptographic sponge.
A sponge can
absorbor take in inputs and latersqueezeor output bytes or field elements. The outputs are dependent on previousabsorbandsqueezecalls. - Field
Based Cryptographic Sponge - The interface for field-based cryptographic sponge.
CFis the native field used by the cryptographic sponge implementation. - Sponge
Ext - An extension for the interface of a cryptographic sponge.
In addition to operations defined in
CryptographicSponge,SpongeExtcan convert itself to a state, and instantiate itself from state.