pub trait PoseidonInstructions<F: Field, S: Spec<F, T, RATE>, const T: usize, const RATE: usize>: Chip<F> {
    type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>;

    // Required method
    fn permute(
        &self,
        layouter: &mut impl Layouter<F>,
        initial_state: &[Self::Word; T]
    ) -> Result<[Self::Word; T], Error>;
}
Expand description

The set of circuit instructions required to use the Poseidon permutation.

Required Associated Types§

source

type Word: Clone + Debug + From<AssignedCell<F, F>> + Into<AssignedCell<F, F>>

Variable representing the word over which the Poseidon permutation operates.

Required Methods§

source

fn permute( &self, layouter: &mut impl Layouter<F>, initial_state: &[Self::Word; T] ) -> Result<[Self::Word; T], Error>

Applies the Poseidon permutation to the given state.

Implementors§

source§

impl<F: Field, S: Spec<F, WIDTH, RATE>, const WIDTH: usize, const RATE: usize> PoseidonInstructions<F, S, WIDTH, RATE> for Pow5Chip<F, WIDTH, RATE>

§

type Word = StateWord<F>