p3_poseidon2

Function internal_permute_state

Source
pub fn internal_permute_state<AF: AbstractField, const WIDTH: usize, const D: u64>(
    state: &mut [AF; WIDTH],
    diffusion_mat: fn(_: &mut [AF; WIDTH]),
    internal_constants: &[AF::F],
)
Expand description

A helper method which allows any field to easily implement Internal Layer. This should only be used in places where performance is not critical.