pub struct BatchItem<S: RingSuite> { /* private fields */ }Expand description
Pre-processed data for a single ring proof awaiting batch verification.
Implementations§
Source§impl<S: RingSuite> BatchItem<S>
impl<S: RingSuite> BatchItem<S>
Sourcepub fn new(
verifier: &RingVerifier<S>,
ios: impl AsRef<[VrfIo<S>]>,
ad: impl AsRef<[u8]>,
proof: &Proof<S>,
) -> Result<Self, Error>
pub fn new( verifier: &RingVerifier<S>, ios: impl AsRef<[VrfIo<S>]>, ad: impl AsRef<[u8]>, proof: &Proof<S>, ) -> Result<Self, Error>
Prepare a proof for deferred batch verification.
Performs the cheap per-proof work (hashing, transcript setup) without
the expensive pairing and MSM checks. verifier must be the ring
verifier the proof was produced against.
Returns Error::InvalidData if the proof’s key commitment cannot be
converted (e.g. identity point on SW-form suites).
Auto Trait Implementations§
impl<S> Freeze for BatchItem<S>where
<S as Suite>::Affine: Sized + Freeze,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + Freeze,
<<S as Suite>::Affine as AffineRepr>::ScalarField: Freeze,
<<S as RingSuite>::Pairing as Pairing>::G1Affine: Freeze,
<<S as RingSuite>::Pairing as Pairing>::ScalarField == <<S as Suite>::Affine as AffineRepr>::BaseField,
impl<S> RefUnwindSafe for BatchItem<S>where
<S as Suite>::Affine: Sized + RefUnwindSafe,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + RefUnwindSafe,
<<S as Suite>::Affine as AffineRepr>::ScalarField: RefUnwindSafe,
<<S as RingSuite>::Pairing as Pairing>::G1Affine: RefUnwindSafe,
<<S as RingSuite>::Pairing as Pairing>::ScalarField == <<S as Suite>::Affine as AffineRepr>::BaseField,
impl<S> Send for BatchItem<S>
impl<S> Sync for BatchItem<S>
impl<S> Unpin for BatchItem<S>where
<S as Suite>::Affine: Sized + Unpin,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + Unpin,
<<S as Suite>::Affine as AffineRepr>::ScalarField: Unpin,
<<S as RingSuite>::Pairing as Pairing>::G1Affine: Unpin,
<<S as RingSuite>::Pairing as Pairing>::ScalarField == <<S as Suite>::Affine as AffineRepr>::BaseField,
impl<S> UnsafeUnpin for BatchItem<S>where
<S as Suite>::Affine: Sized + UnsafeUnpin,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + UnsafeUnpin,
<<S as Suite>::Affine as AffineRepr>::ScalarField: UnsafeUnpin,
<<S as RingSuite>::Pairing as Pairing>::G1Affine: UnsafeUnpin,
<<S as RingSuite>::Pairing as Pairing>::ScalarField == <<S as Suite>::Affine as AffineRepr>::BaseField,
impl<S> UnwindSafe for BatchItem<S>where
<S as Suite>::Affine: Sized + UnwindSafe,
<<S as Suite>::Affine as AffineRepr>::Config: Sized,
<<S as Suite>::Affine as AffineRepr>::BaseField: Sized + UnwindSafe,
<<S as Suite>::Affine as AffineRepr>::ScalarField: UnwindSafe,
<<S as RingSuite>::Pairing as Pairing>::G1Affine: UnwindSafe,
<<S as RingSuite>::Pairing as Pairing>::ScalarField == <<S as Suite>::Affine as AffineRepr>::BaseField,
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> 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