openvm_poseidon2_air

Trait Permutation

Source
pub trait Permutation<T>: Clone + Sync
where T: Clone,
{ // Required method fn permute_mut(&self, input: &mut T); // Provided method fn permute(&self, input: T) -> T { ... } }
Expand description

A permutation in the mathematical sense.

Required Methods§

Source

fn permute_mut(&self, input: &mut T)

Provided Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Permutation<[u8; 200]> for KeccakF

Source§

fn permute(&self, input_u8s: [u8; 200]) -> [u8; 200]

Source§

fn permute_mut(&self, input: &mut [u8; 200])

Source§

impl Permutation<[u64; 25]> for KeccakF

Source§

fn permute_mut(&self, input: &mut [u64; 25])

Source§

impl Permutation<[Goldilocks; 8]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 8]) -> [Goldilocks; 8]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 8])

Source§

impl Permutation<[Goldilocks; 12]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 12]) -> [Goldilocks; 12]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 12])

Source§

impl Permutation<[Goldilocks; 16]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 16]) -> [Goldilocks; 16]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 16])

Source§

impl Permutation<[Goldilocks; 24]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 24]) -> [Goldilocks; 24]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 24])

Source§

impl Permutation<[Goldilocks; 32]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 32]) -> [Goldilocks; 32]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 32])

Source§

impl Permutation<[Goldilocks; 64]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 64]) -> [Goldilocks; 64]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 64])

Source§

impl Permutation<[Goldilocks; 68]> for MdsMatrixGoldilocks

Source§

fn permute(&self, input: [Goldilocks; 68]) -> [Goldilocks; 68]

Source§

fn permute_mut(&self, input: &mut [Goldilocks; 68])

Source§

impl Permutation<[[u64; 1]; 25]> for KeccakF

Source§

fn permute_mut(&self, input: &mut [[u64; 1]; 25])

Source§

impl<AF> Permutation<[AF; 4]> for HLMDSMat4
where AF: AbstractField,

Source§

fn permute(&self, input: [AF; 4]) -> [AF; 4]

Source§

fn permute_mut(&self, input: &mut [AF; 4])

Source§

impl<AF> Permutation<[AF; 4]> for MDSMat4
where AF: AbstractField,

Source§

fn permute(&self, input: [AF; 4]) -> [AF; 4]

Source§

fn permute_mut(&self, input: &mut [AF; 4])

Source§

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

Source§

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

Source§

impl<AF, Mds, const WIDTH: usize, const ALPHA: u64> Permutation<[AF; WIDTH]> for Poseidon<<AF as AbstractField>::F, Mds, WIDTH, ALPHA>
where AF: AbstractField, <AF as AbstractField>::F: PrimeField, Mds: MdsPermutation<AF, WIDTH>,

Source§

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

Source§

impl<AF, const N: usize> Permutation<[AF; N]> for CosetMds<<AF as AbstractField>::F, N>

Source§

fn permute(&self, input: [AF; N]) -> [AF; N]

Source§

fn permute_mut(&self, values: &mut [AF; N])

Source§

impl<AF, const N: usize> Permutation<[AF; N]> for IntegratedCosetMds<<AF as AbstractField>::F, N>
where AF: AbstractField,

Source§

fn permute(&self, input: [AF; N]) -> [AF; N]

Source§

fn permute_mut(&self, values: &mut [AF; N])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 8]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

Source§

fn permute(&self, input: [MontyField31<FP>; 8]) -> [MontyField31<FP>; 8]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 8])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 12]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

Source§

fn permute(&self, input: [MontyField31<FP>; 12]) -> [MontyField31<FP>; 12]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 12])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 16]> for MdsMatrixMontyField31<MU>
where FP: MontyParameters, MU: MDSUtils,

Source§

fn permute(&self, input: [MontyField31<FP>; 16]) -> [MontyField31<FP>; 16]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 16])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 24]> for MdsMatrixMontyField31<MU>
where MU: MDSUtils, FP: BarrettParameters,

Source§

fn permute(&self, input: [MontyField31<FP>; 24]) -> [MontyField31<FP>; 24]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 24])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 32]> for MdsMatrixMontyField31<MU>
where FP: BarrettParameters, MU: MDSUtils,

Source§

fn permute(&self, input: [MontyField31<FP>; 32]) -> [MontyField31<FP>; 32]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 32])

Source§

impl<FP, MU> Permutation<[MontyField31<FP>; 64]> for MdsMatrixMontyField31<MU>
where FP: BarrettParameters, MU: MDSUtils,

Source§

fn permute(&self, input: [MontyField31<FP>; 64]) -> [MontyField31<FP>; 64]

Source§

fn permute_mut(&self, input: &mut [MontyField31<FP>; 64])

Source§

impl<T, P> Permutation<T> for Instrumented<P>
where T: Clone, P: Permutation<T>,

Source§

fn permute_mut(&self, input: &mut T)

Source§

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

Implementors§