Struct challenge_bypass_ristretto::dleq::BatchDLEQProof
source · 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: DLEQProof
Implementations§
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 SignedToken
s 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 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