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<FA> Permutation<[FA; 4]> for HLMDSMat4
where FA: FieldAlgebra,

Source§

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

Source§

impl<FA> Permutation<[FA; 4]> for MDSMat4
where FA: FieldAlgebra,

Source§

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

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§

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

Source§

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

Source§

impl<FA, const N: usize> Permutation<[FA; N]> for CosetMds<<FA as FieldAlgebra>::F, N>
where FA: FieldAlgebra, <FA as FieldAlgebra>::F: TwoAdicField,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn permute_mut(&self, values: &mut [FA; 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§