Expand description
State of a rescue-based, overwrite-mode cryptographic sponge (compliant with spongefish)
§Historical note
In 0.2.0 (and earlier versions), we used to have RescueSponge
which
consists of a permutation function and an internal state. RescueSponge
implements what ark-sponge’s trait CryptographicSponge
(absorb, squeeze
etc.) and Absorb
is implemented on RescueParameter
config-marker trait
for finite field types that support rescue permutation.
When we migrate to spongefish
’s API design, here are the mapping:
Absorb
->Unit
(which can beu8
orFp
)CryptographicSponge
->DuplexSpongeInterface
- but we don’t manually implement
DuplexSpongeInterface
, instead we define a new replacement forRescueSponge
namedRescuePermutation
which implementstrait Permutation
, and directly useDuplexSponge<C:Permutation>
in spongefish
- but we don’t manually implement
Thus the old RescueSponge is now replaced by the new RescueSponge (same name) with the similar duplex sponge APIs, except that by following spongefish’s design, the state and the sponge behavior are not implemented on the same struct.
Structs§
- Rescue
Permutation - State of rescue sponge, containing necessary permutation instance.
Replacing
RescueSponge
, see module doc.
Type Aliases§
- Rescue
Sponge - Duplex sponge from
RescuePermutation