pub struct SamePermutationProof { /* private fields */ }Expand description
A same permutation proof object
Implementations§
Source§impl SamePermutationProof
impl SamePermutationProof
Sourcepub fn new<T: RngCore>(
crs_G_vec: &Vec<G1Affine>,
crs_H_vec: &Vec<G1Affine>,
crs_U: &G1Projective,
A: G1Projective,
M: G1Projective,
vec_a: &Vec<Fr>,
permutation: Vec<u32>,
vec_a_blinders: Vec<Fr>,
vec_m_blinders: Vec<Fr>,
transcript: &mut Transcript,
rng: &mut T,
) -> SamePermutationProof
pub fn new<T: RngCore>( crs_G_vec: &Vec<G1Affine>, crs_H_vec: &Vec<G1Affine>, crs_U: &G1Projective, A: G1Projective, M: G1Projective, vec_a: &Vec<Fr>, permutation: Vec<u32>, vec_a_blinders: Vec<Fr>, vec_m_blinders: Vec<Fr>, transcript: &mut Transcript, rng: &mut T, ) -> SamePermutationProof
Create a same permutation proof
§Arguments
crs_G_vec- $\bm{g}$ CRS vectorcrs_H_vec- $\bm{h}$ CRS vectorcrs_U- $\bm{H}$ CRS elementA- commitment to permutedvec_aM- commitment topermutationvec_a- scalar vectorpermutation- shuffle permutation (witness)vec_a_blinders- blinders forvec_a(witness)vec_m_blinders- blinders forvec_m(witness)
Sourcepub fn verify<T: RngCore>(
&self,
crs_G_vec: &Vec<G1Affine>,
crs_H_vec: &Vec<G1Affine>,
crs_U: &G1Projective,
crs_G_sum: &G1Affine,
crs_H_sum: &G1Affine,
A: &G1Projective,
M: &G1Projective,
vec_a: &Vec<Fr>,
n_blinders: usize,
transcript: &mut Transcript,
msm_accumulator: &mut MsmAccumulator,
rng: &mut T,
) -> Result<(), ProofError>
pub fn verify<T: RngCore>( &self, crs_G_vec: &Vec<G1Affine>, crs_H_vec: &Vec<G1Affine>, crs_U: &G1Projective, crs_G_sum: &G1Affine, crs_H_sum: &G1Affine, A: &G1Projective, M: &G1Projective, vec_a: &Vec<Fr>, n_blinders: usize, transcript: &mut Transcript, msm_accumulator: &mut MsmAccumulator, rng: &mut T, ) -> Result<(), ProofError>
Verify a same permutation proof
§Arguments
crs_G_vec- $\bm{g}$ CRS vectorcrs_H_vec- $\bm{h}$ CRS vectorcrs_U- $\bm{H}$ CRS elementA- commitment to permutedvec_aM- commitment topermutationvec_a- scalar vector
Trait Implementations§
Source§impl Clone for SamePermutationProof
impl Clone for SamePermutationProof
Source§fn clone(&self) -> SamePermutationProof
fn clone(&self) -> SamePermutationProof
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SamePermutationProof
impl RefUnwindSafe for SamePermutationProof
impl Send for SamePermutationProof
impl Sync for SamePermutationProof
impl Unpin for SamePermutationProof
impl UnwindSafe for SamePermutationProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more