Module ivc::poseidon_8_56_5_3_2
source · Expand description
Poseidon hash function with 8 full rounds, 56 partial rounds, sbox 5, a state of 3 elements and constraints of degree 2 Specialised circuit for Poseidon where we have maximum degree 2 constraints.
Modules
- Poseidon parameters that can be used by crate::poseidon_8_56_5_3_2 over the scalar field of BN254, for a security level of 128 bits.
- Implement an interpreter for a specific instance of the Poseidon inner permutation. The Poseidon construction is defined in the paper “Poseidon: A New Hash Function”. The Poseidon instance works on a state of size
STATE_SIZE
and is designed to work with full and partial rounds. As a reminder, the Poseidon permutation is a mapping fromF^STATE_SIZE
toF^STATE_SIZE
. The user is responsible to provide the correct number of full and partial rounds for the given field and the state. Also, it is hard-coded that the substitution is5
. The user must verify that5
is coprime withp - 1
wherep
is the order the field. The constants and matrix can be generated the fileposeidon/src/pasta/params.sage