Struct challenge_bypass_ristretto::dleq::DLEQProof
source · pub struct DLEQProof {
pub(crate) c: Scalar,
pub(crate) s: Scalar,
}
Expand description
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\)
Implementations§
source§impl DLEQProof
impl DLEQProof
sourcefn _new<D, T>(
rng: &mut T,
P: RistrettoPoint,
Q: RistrettoPoint,
k: &SigningKey
) -> Self
fn _new<D, T>( rng: &mut T, P: RistrettoPoint, Q: RistrettoPoint, k: &SigningKey ) -> Self
Construct a new DLEQProof
sourcepub fn new<D, T>(
rng: &mut T,
blinded_token: &BlindedToken,
signed_token: &SignedToken,
k: &SigningKey
) -> Result<Self, TokenError>
pub fn new<D, T>( rng: &mut T, blinded_token: &BlindedToken, signed_token: &SignedToken, k: &SigningKey ) -> Result<Self, TokenError>
Construct a new DLEQProof
sourcefn _verify<D>(
&self,
P: RistrettoPoint,
Q: RistrettoPoint,
public_key: &PublicKey
) -> Result<(), TokenError>
fn _verify<D>( &self, P: RistrettoPoint, Q: RistrettoPoint, public_key: &PublicKey ) -> Result<(), TokenError>
Verify the DLEQProof
sourcepub fn verify<D>(
&self,
blinded_token: &BlindedToken,
signed_token: &SignedToken,
public_key: &PublicKey
) -> Result<(), TokenError>
pub fn verify<D>( &self, blinded_token: &BlindedToken, signed_token: &SignedToken, public_key: &PublicKey ) -> Result<(), TokenError>
Verify the DLEQProof
source§impl DLEQProof
impl DLEQProof
fn bytes_length_error() -> TokenError
sourcepub fn from_bytes(bytes: &[u8]) -> Result<DLEQProof, TokenError>
pub fn from_bytes(bytes: &[u8]) -> Result<DLEQProof, TokenError>
Construct a DLEQProof
from a slice of bytes.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DLEQProof
impl Send for DLEQProof
impl Sync for DLEQProof
impl Unpin for DLEQProof
impl UnwindSafe for DLEQProof
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