Type Alias Plonky3Poseidon2Executor

Source
pub type Plonky3Poseidon2Executor<F, LinearLayers> = Poseidon2<<F as Field>::Packing, Poseidon2ExternalLayer<F, LinearLayers, POSEIDON2_WIDTH>, Poseidon2InternalLayer<F, LinearLayers>, POSEIDON2_WIDTH, BABY_BEAR_POSEIDON2_SBOX_DEGREE>;

Aliased Type§

struct Plonky3Poseidon2Executor<F, LinearLayers> { /* private fields */ }

Implementations

Source§

impl<FA, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>
where FA: FieldAlgebra, <FA as FieldAlgebra>::F: PrimeField, ExternalPerm: ExternalLayerConstructor<FA, WIDTH>, InternalPerm: InternalLayerConstructor<FA>,

Source

pub fn new( external_constants: ExternalLayerConstants<<FA as FieldAlgebra>::F, WIDTH>, internal_constants: Vec<<FA as FieldAlgebra>::F>, ) -> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>

Create a new Poseidon2 configuration. This internally converts the given constants to the relevant packed versions.

Source

pub fn new_from_rng<R>( rounds_f: usize, rounds_p: usize, rng: &mut R, ) -> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>
where R: Rng, Standard: Distribution<<FA as FieldAlgebra>::F> + Distribution<[<FA as FieldAlgebra>::F; WIDTH]>,

Create a new Poseidon2 configuration with random parameters.

Source§

impl<FA, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>
where FA: FieldAlgebra, <FA as FieldAlgebra>::F: PrimeField64, ExternalPerm: ExternalLayerConstructor<FA, WIDTH>, InternalPerm: InternalLayerConstructor<FA>,

Source

pub fn new_from_rng_128<R>( rng: &mut R, ) -> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>
where R: Rng, Standard: Distribution<<FA as FieldAlgebra>::F> + Distribution<[<FA as FieldAlgebra>::F; WIDTH]>,

Create a new Poseidon2 configuration with 128 bit security and random rounds constants.

Trait Implementations

Source§

impl<F, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Clone for Poseidon2<F, ExternalPerm, InternalPerm, WIDTH, D>
where F: Clone, ExternalPerm: Clone, InternalPerm: Clone,

Source§

fn clone(&self) -> Poseidon2<F, ExternalPerm, InternalPerm, WIDTH, D>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Debug for Poseidon2<F, ExternalPerm, InternalPerm, WIDTH, D>
where F: Debug, ExternalPerm: Debug, InternalPerm: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<FA, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> Permutation<[FA; WIDTH]> for Poseidon2<<<FA as FieldAlgebra>::F as Field>::Packing, ExternalPerm, InternalPerm, WIDTH, D>
where FA: FieldAlgebra + Sync, <FA as FieldAlgebra>::F: PrimeField, ExternalPerm: ExternalLayer<FA, WIDTH, D>, InternalPerm: InternalLayer<FA, WIDTH, D>,

Source§

fn permute_mut(&self, state: &mut [FA; WIDTH])

Source§

fn permute(&self, input: T) -> T

Source§

impl<FA, ExternalPerm, InternalPerm, const WIDTH: usize, const D: u64> CryptographicPermutation<[FA; WIDTH]> for Poseidon2<<<FA as FieldAlgebra>::F as Field>::Packing, ExternalPerm, InternalPerm, WIDTH, D>
where FA: FieldAlgebra + Sync, <FA as FieldAlgebra>::F: PrimeField, ExternalPerm: ExternalLayer<FA, WIDTH, D>, InternalPerm: InternalLayer<FA, WIDTH, D>,