pub struct ProofCommittedBuilder<B, C, const P: usize, const S: usize> where
B: Clone + Copy + Debug + Default + ConstantTimeEq + PartialEq + Eq + Curve<AffineRepr = C>,
C: GroupEncoding + Debug, { /* private fields */ }
Expand description
A builder struct for creating a proof of knowledge of messages in a vector commitment each message has a blinding factor
Implementations
sourceimpl<B, C, const P: usize, const S: usize> ProofCommittedBuilder<B, C, P, S> where
B: Clone + Copy + Debug + Default + ConstantTimeEq + PartialEq + Eq + Curve<AffineRepr = C>,
C: GroupEncoding + Debug,
impl<B, C, const P: usize, const S: usize> ProofCommittedBuilder<B, C, P, S> where
B: Clone + Copy + Debug + Default + ConstantTimeEq + PartialEq + Eq + Curve<AffineRepr = C>,
C: GroupEncoding + Debug,
sourcepub fn commit_random(&mut self, point: B, rng: impl RngCore)
pub fn commit_random(&mut self, point: B, rng: impl RngCore)
Add a specified point and generate a random blinding factor
sourcepub fn commit(&mut self, point: B, scalar: Scalar)
pub fn commit(&mut self, point: B, scalar: Scalar)
Commit a specified point with the specified scalar
sourcepub fn get(&self, index: usize) -> Option<(B, Scalar)>
pub fn get(&self, index: usize) -> Option<(B, Scalar)>
Return the point and blinding factor at the specified index
sourcepub fn add_challenge_contribution(&mut self, hasher: &mut impl Update)
pub fn add_challenge_contribution(&mut self, hasher: &mut impl Update)
Convert the committed values to bytes for the fiat-shamir challenge
Trait Implementations
Auto Trait Implementations
impl<B, C, const P: usize, const S: usize> RefUnwindSafe for ProofCommittedBuilder<B, C, P, S> where
B: RefUnwindSafe,
impl<B, C, const P: usize, const S: usize> Send for ProofCommittedBuilder<B, C, P, S>
impl<B, C, const P: usize, const S: usize> Sync for ProofCommittedBuilder<B, C, P, S>
impl<B, C, const P: usize, const S: usize> Unpin for ProofCommittedBuilder<B, C, P, S> where
B: Unpin,
impl<B, C, const P: usize, const S: usize> UnwindSafe for ProofCommittedBuilder<B, C, P, S> where
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more