[][src]Struct challenge_bypass_ristretto::dleq::DLEQProof

pub struct DLEQProof {
    pub(crate) c: Scalar,
    pub(crate) s: Scalar,
}

A DLEQProof is a proof of the equivalence of the discrete logarithm between two pairs of points.

Fields

c: Scalar

c is a Scalar \(c=H_3(X,Y,P,Q,A,B)\)

s: Scalar

s is a Scalar \(s = (t - ck) \mod q\)

Methods

impl DLEQProof[src]

fn _new<D, T>(
    rng: &mut T,
    P: RistrettoPoint,
    Q: RistrettoPoint,
    k: &SigningKey
) -> Result<Self, TokenError> where
    D: Digest<OutputSize = U64> + Default,
    T: Rng + CryptoRng
[src]

Construct a new DLEQProof

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

Construct a new DLEQProof

fn _verify<D>(
    &self,
    P: RistrettoPoint,
    Q: RistrettoPoint,
    public_key: &PublicKey
) -> Result<(), TokenError> where
    D: Digest<OutputSize = U64> + Default
[src]

Verify the DLEQProof

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

Verify the DLEQProof

impl DLEQProof[src]

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

Convert this DLEQProof to a byte array.

fn bytes_length_error() -> TokenError[src]

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

Construct a DLEQProof from a slice of bytes.

Auto Trait Implementations

impl Send for DLEQProof

impl Sync for DLEQProof

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