Enum proof_system::sub_protocols::SubProtocol
source · pub enum SubProtocol<'a, E: Pairing, G: AffineRepr> {
PoKBBSSignatureG1(PoKBBSSigG1SubProtocol<'a, E>),
AccumulatorMembership(AccumulatorMembershipSubProtocol<'a, E>),
AccumulatorNonMembership(AccumulatorNonMembershipSubProtocol<'a, E>),
PoKDiscreteLogs(SchnorrProtocol<'a, G>),
Saver(SaverProtocol<'a, E>),
BoundCheckProtocol(BoundCheckProtocol<'a, E>),
R1CSLegogroth16Protocol(R1CSLegogroth16Protocol<'a, E>),
PSSignaturePoK(PSSignaturePoK<'a, E>),
PoKBBSSignature23G1(PoKBBSSigG1SubProtocol<'a, E>),
}Expand description
Various sub-protocols that are executed to create a StatementProof which are then combined to
form a Proof
Variants§
PoKBBSSignatureG1(PoKBBSSigG1SubProtocol<'a, E>)
For BBS+ signature in group G1
AccumulatorMembership(AccumulatorMembershipSubProtocol<'a, E>)
AccumulatorNonMembership(AccumulatorNonMembershipSubProtocol<'a, E>)
PoKDiscreteLogs(SchnorrProtocol<'a, G>)
Saver(SaverProtocol<'a, E>)
For verifiable encryption using SAVER
BoundCheckProtocol(BoundCheckProtocol<'a, E>)
For range proof using LegoGroth16
R1CSLegogroth16Protocol(R1CSLegogroth16Protocol<'a, E>)
PSSignaturePoK(PSSignaturePoK<'a, E>)
PoKBBSSignature23G1(PoKBBSSigG1SubProtocol<'a, E>)
For BBS signature in group G1
Implementations§
source§impl<'a, E: Pairing, G: AffineRepr<ScalarField = E::ScalarField>> SubProtocol<'a, E, G>
impl<'a, E: Pairing, G: AffineRepr<ScalarField = E::ScalarField>> SubProtocol<'a, E, G>
pub fn challenge_contribution<W: Write>( &self, writer: W ) -> Result<(), ProofSystemError>
pub fn gen_proof_contribution( &mut self, challenge: &E::ScalarField ) -> Result<StatementProof<E, G>, ProofSystemError>
Trait Implementations§
source§impl<'a, E: Clone + Pairing, G: Clone + AffineRepr> Clone for SubProtocol<'a, E, G>
impl<'a, E: Clone + Pairing, G: Clone + AffineRepr> Clone for SubProtocol<'a, E, G>
source§fn clone(&self) -> SubProtocol<'a, E, G>
fn clone(&self) -> SubProtocol<'a, E, G>
Returns a copy 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 moresource§impl<'a, E: Debug + Pairing, G: Debug + AffineRepr> Debug for SubProtocol<'a, E, G>
impl<'a, E: Debug + Pairing, G: Debug + AffineRepr> Debug for SubProtocol<'a, E, G>
source§impl<'a, E: PartialEq + Pairing, G: PartialEq + AffineRepr> PartialEq<SubProtocol<'a, E, G>> for SubProtocol<'a, E, G>
impl<'a, E: PartialEq + Pairing, G: PartialEq + AffineRepr> PartialEq<SubProtocol<'a, E, G>> for SubProtocol<'a, E, G>
source§fn eq(&self, other: &SubProtocol<'a, E, G>) -> bool
fn eq(&self, other: &SubProtocol<'a, E, G>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<'a, E: Pairing, G: AffineRepr> StructuralPartialEq for SubProtocol<'a, E, G>
Auto Trait Implementations§
impl<'a, E, G> RefUnwindSafe for SubProtocol<'a, E, G>where G: RefUnwindSafe, <E as Pairing>::G1Affine: RefUnwindSafe, <E as Pairing>::G2Affine: RefUnwindSafe, <E as Pairing>::ScalarField: RefUnwindSafe, <G as AffineRepr>::ScalarField: RefUnwindSafe, <E as Pairing>::TargetField: RefUnwindSafe,
impl<'a, E, G> Send for SubProtocol<'a, E, G>
impl<'a, E, G> Sync for SubProtocol<'a, E, G>
impl<'a, E, G> Unpin for SubProtocol<'a, E, G>where G: Unpin, <E as Pairing>::G1Affine: Unpin, <E as Pairing>::G2Affine: Unpin, <E as Pairing>::ScalarField: Unpin, <G as AffineRepr>::ScalarField: Unpin, <E as Pairing>::TargetField: Unpin,
impl<'a, E, G> UnwindSafe for SubProtocol<'a, E, G>where G: UnwindSafe + RefUnwindSafe, <E as Pairing>::G1Affine: UnwindSafe + RefUnwindSafe, <E as Pairing>::G2Affine: UnwindSafe + RefUnwindSafe, <E as Pairing>::ScalarField: UnwindSafe + RefUnwindSafe, <G as AffineRepr>::ScalarField: UnwindSafe, <E as Pairing>::TargetField: UnwindSafe,
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
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>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref