[][src]Struct challenge_bypass_ristretto::voprf::BatchDLEQProof

pub struct BatchDLEQProof(DLEQProof);

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.

Methods

impl BatchDLEQProof[src]

fn calculate_composites<D>(
    blinded_tokens: &[BlindedToken],
    signed_tokens: &[SignedToken],
    public_key: &PublicKey
) -> Result<(RistrettoPoint, RistrettoPoint), TokenError> where
    D: Digest<OutputSize = U64> + Default
[src]

pub fn new<D, T>(
    rng: &mut T,
    blinded_tokens: &[BlindedToken],
    signed_tokens: &[SignedToken],
    signing_key: &SigningKey
) -> Result<Self, TokenError> where
    D: Digest<OutputSize = U64> + Default,
    T: Rng + CryptoRng
[src]

Construct a new BatchDLEQProof

pub fn verify<D>(
    &self,
    blinded_tokens: &[BlindedToken],
    signed_tokens: &[SignedToken],
    public_key: &PublicKey
) -> Result<(), TokenError> where
    D: Digest<OutputSize = U64> + Default
[src]

Verify a BatchDLEQProof

pub fn verify_and_unblind<'a, D, I>(
    &self,
    tokens: I,
    blinded_tokens: &[BlindedToken],
    signed_tokens: &[SignedToken],
    public_key: &PublicKey
) -> Result<Vec<UnblindedToken>, TokenError> where
    D: Digest<OutputSize = U64> + Default,
    I: IntoIterator<Item = &'a Token>, 
[src]

Verify the BatchDLEQProof then unblind the SignedTokens using each corresponding Token

impl BatchDLEQProof[src]

pub fn to_bytes(&self) -> [u8; 64][src]

Convert this BatchDLEQProof to a byte array.

pub fn from_bytes(bytes: &[u8]) -> Result<BatchDLEQProof, TokenError>[src]

Construct a BatchDLEQProof from a slice of bytes.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self