pub struct PedersenEmulatedGadget<C: SonobeCurve, const H: bool> { /* private fields */ }Expand description
PedersenEmulatedGadget defines the in-circuit Pedersen gadget that
operates over the scalar field of the curve and supports emulated elliptic
curve point variables as commitments, where H controls whether the scheme
is hiding or not.
Trait Implementations§
Source§impl<C: Clone + SonobeCurve, const H: bool> Clone for PedersenEmulatedGadget<C, H>
impl<C: Clone + SonobeCurve, const H: bool> Clone for PedersenEmulatedGadget<C, H>
Source§fn clone(&self) -> PedersenEmulatedGadget<C, H>
fn clone(&self) -> PedersenEmulatedGadget<C, H>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: SonobeCurve> CommitmentDefGadget for PedersenEmulatedGadget<C, false>
impl<C: SonobeCurve> CommitmentDefGadget for PedersenEmulatedGadget<C, false>
Source§type ConstraintField = <C as PrimeGroup>::ScalarField
type ConstraintField = <C as PrimeGroup>::ScalarField
CommitmentDefGadget::ConstraintField is the field over which the
circuit running the commitment scheme is defined.Source§type KeyVar = PedersenEmulatedKeyVar<C, false>
type KeyVar = PedersenEmulatedKeyVar<C, false>
CommitmentDefGadget::KeyVar is the in-circuit variable type for the
commitment key.Source§type ScalarVar = FpVar<<C as PrimeGroup>::ScalarField>
type ScalarVar = FpVar<<C as PrimeGroup>::ScalarField>
CommitmentDefGadget::ScalarVar is the in-circuit variable type for
the scalars being committed to.Source§type CommitmentVar = EmulatedAffineVar<<C as PrimeGroup>::ScalarField, C>
type CommitmentVar = EmulatedAffineVar<<C as PrimeGroup>::ScalarField, C>
CommitmentDefGadget::CommitmentVar is the in-circuit variable type
for the commitment.Source§type RandomnessVar = Null
type RandomnessVar = Null
CommitmentDefGadget::RandomnessVar is the in-circuit variable type
for the randomness used in the commitment.Source§type Widget = Pedersen<C, false>
type Widget = Pedersen<C, false>
CommitmentDefGadget::Widget points to the out-of-circuit commitment
scheme widget.Source§impl<C: SonobeCurve> CommitmentDefGadget for PedersenEmulatedGadget<C, true>
impl<C: SonobeCurve> CommitmentDefGadget for PedersenEmulatedGadget<C, true>
Source§type ConstraintField = <C as PrimeGroup>::ScalarField
type ConstraintField = <C as PrimeGroup>::ScalarField
CommitmentDefGadget::ConstraintField is the field over which the
circuit running the commitment scheme is defined.Source§type KeyVar = PedersenEmulatedKeyVar<C, true>
type KeyVar = PedersenEmulatedKeyVar<C, true>
CommitmentDefGadget::KeyVar is the in-circuit variable type for the
commitment key.Source§type ScalarVar = FpVar<<C as PrimeGroup>::ScalarField>
type ScalarVar = FpVar<<C as PrimeGroup>::ScalarField>
CommitmentDefGadget::ScalarVar is the in-circuit variable type for
the scalars being committed to.Source§type CommitmentVar = EmulatedAffineVar<<C as PrimeGroup>::ScalarField, C>
type CommitmentVar = EmulatedAffineVar<<C as PrimeGroup>::ScalarField, C>
CommitmentDefGadget::CommitmentVar is the in-circuit variable type
for the commitment.Source§type RandomnessVar = FpVar<<C as PrimeGroup>::ScalarField>
type RandomnessVar = FpVar<<C as PrimeGroup>::ScalarField>
CommitmentDefGadget::RandomnessVar is the in-circuit variable type
for the randomness used in the commitment.Source§type Widget = Pedersen<C, true>
type Widget = Pedersen<C, true>
CommitmentDefGadget::Widget points to the out-of-circuit commitment
scheme widget.Source§impl<C: Debug + SonobeCurve, const H: bool> Debug for PedersenEmulatedGadget<C, H>
impl<C: Debug + SonobeCurve, const H: bool> Debug for PedersenEmulatedGadget<C, H>
impl<C: Eq + SonobeCurve, const H: bool> Eq for PedersenEmulatedGadget<C, H>
Source§impl<C: PartialEq + SonobeCurve, const H: bool> PartialEq for PedersenEmulatedGadget<C, H>
impl<C: PartialEq + SonobeCurve, const H: bool> PartialEq for PedersenEmulatedGadget<C, H>
impl<C: PartialEq + SonobeCurve, const H: bool> StructuralPartialEq for PedersenEmulatedGadget<C, H>
Auto Trait Implementations§
impl<C, const H: bool> Freeze for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
impl<C, const H: bool> RefUnwindSafe for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
C: RefUnwindSafe,
impl<C, const H: bool> Send for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
impl<C, const H: bool> Sync for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
impl<C, const H: bool> Unpin for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
C: Unpin,
impl<C, const H: bool> UnsafeUnpin for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
impl<C, const H: bool> UnwindSafe for PedersenEmulatedGadget<C, H>where
<C as Val>::Var: Sized,
<C as CurveGroup>::Config: Sized,
<<C as CurveGroup>::BaseField as Val>::Var: for<'a> Sized,
<C as CurveGroup>::BaseField: Sized,
<<C as PrimeGroup>::ScalarField as Val>::Var: for<'a> Sized,
<C as PrimeGroup>::ScalarField: Sized,
C: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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