Expand description
This module implements the Poseidon constraint polynomials.
Structs§
- Poseidon
- Implementation of the Poseidon gate
Poseidon quotient poly contribution computation
f^7 + c(x) - f(wx)
Conjunction of:
Constants§
- POS_
ROWS_ PER_ HASH - Number of PLONK rows required to implement Poseidon
- ROUNDS_
PER_ HASH - Number of rounds
- ROUNDS_
PER_ ROW - Number of rows
- SPONGE_
WIDTH - Width of the sponge
- STATE_
ORDER - The order in a row in which we store states before and after permutations
Functions§
- generate_
witness generate_witness(row, params, witness_cols, input)
uses a sponge initialized withparams
to generate a witness for starting at rowrow
inwitness_cols
, and with inputinput
.- round_
to_ cols - Given a Poseidon round from 0 to 4 (inclusive), returns the columns (as a range) that are used in this round.