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>,
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>,
Sourcepub fn new(
external_constants: ExternalLayerConstants<<FA as FieldAlgebra>::F, WIDTH>,
internal_constants: Vec<<FA as FieldAlgebra>::F>,
) -> Poseidon2<FA, ExternalPerm, InternalPerm, WIDTH, D>
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.
Sourcepub 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]>,
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>,
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>,
Sourcepub 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]>,
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.