Expand description
Implementation of the Griffin circuit-friendly hash function and its parameter generation, as well as out-of-circuit widgets and in-circuit gadgets for permutation, hashing, sponges, and transcripts.
According to the Griffin paper, it is very efficient in terms of the number of constraints, but later an attack on Griffin and similar hash functions was discovered. Therefore, it is recommended to avoid using Griffin in production.
The code is forked from the implementation in the Hash Functions for Zero-Knowledge Applications Zoo but uses arkworks instead of bellman as the underlying cryptographic library.
Modules§
- sponge
- Implementation of transcript traits for Griffin sponge.
Structs§
- Griffin
Griffinimplements the Griffin permutation and Griffin hash.- Griffin
Gadget GriffinGadgetimplements the gadgets for Griffin permutation and Griffin hash.- Griffin
Params GriffinParamsstores the full parameterisation of the Griffin permutation for a given prime field: state widtht, S-box degreed, number of rounds, round constants, alpha/beta constants, and the MDS-like matrix.