pub struct BatchDLEQProof(DLEQProof);Expand description
A BatchDLEQProof is a proof of the equivalence of the discrete logarithm between a common
pair of points and one or more other pairs of points.
Tuple Fields§
§0: DLEQProofImplementations§
Source§impl BatchDLEQProof
impl BatchDLEQProof
fn calculate_composites<D>( blinded_tokens: &[BlindedToken], signed_tokens: &[SignedToken], public_key: &PublicKey, ) -> Result<(RistrettoPoint, RistrettoPoint), TokenError>
Sourcepub fn new<D, T>(
rng: &mut T,
blinded_tokens: &[BlindedToken],
signed_tokens: &[SignedToken],
signing_key: &SigningKey,
) -> Result<Self, TokenError>
pub fn new<D, T>( rng: &mut T, blinded_tokens: &[BlindedToken], signed_tokens: &[SignedToken], signing_key: &SigningKey, ) -> Result<Self, TokenError>
Construct a new BatchDLEQProof
Sourcepub fn verify<D>(
&self,
blinded_tokens: &[BlindedToken],
signed_tokens: &[SignedToken],
public_key: &PublicKey,
) -> Result<(), TokenError>
pub fn verify<D>( &self, blinded_tokens: &[BlindedToken], signed_tokens: &[SignedToken], public_key: &PublicKey, ) -> Result<(), TokenError>
Verify a BatchDLEQProof
Sourcepub fn verify_and_unblind<'a, D, I>(
&self,
tokens: I,
blinded_tokens: &[BlindedToken],
signed_tokens: &[SignedToken],
public_key: &PublicKey,
) -> Result<Vec<UnblindedToken>, TokenError>
pub fn verify_and_unblind<'a, D, I>( &self, tokens: I, blinded_tokens: &[BlindedToken], signed_tokens: &[SignedToken], public_key: &PublicKey, ) -> Result<Vec<UnblindedToken>, TokenError>
Verify the BatchDLEQProof then unblind the SignedTokens using each corresponding Token
Source§impl BatchDLEQProof
impl BatchDLEQProof
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<BatchDLEQProof, TokenError>
pub fn from_bytes(bytes: &[u8]) -> Result<BatchDLEQProof, TokenError>
Construct a BatchDLEQProof from a slice of bytes.
Trait Implementations§
Source§impl Clone for BatchDLEQProof
impl Clone for BatchDLEQProof
Source§fn clone(&self) -> BatchDLEQProof
fn clone(&self) -> BatchDLEQProof
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 moreAuto Trait Implementations§
impl Freeze for BatchDLEQProof
impl RefUnwindSafe for BatchDLEQProof
impl Send for BatchDLEQProof
impl Sync for BatchDLEQProof
impl Unpin for BatchDLEQProof
impl UnwindSafe for BatchDLEQProof
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