[−][src]Struct challenge_bypass_ristretto::voprf::SigningKey
A SigningKey
is used to sign a BlindedToken
and verify an UnblindedToken
.
This is a server secret and should NEVER be revealed to the client.
Fields
public_key: PublicKey
A PublicKey
showing a committment to this particular key
k: Scalar
k
is the actual key
Methods
impl SigningKey
[src]
pub fn random<T: Rng + CryptoRng>(rng: &mut T) -> Self
[src]
Generates a new random SigningKey
using the provided random number generator.
pub fn sign(&self, P: &BlindedToken) -> Result<SignedToken, TokenError>
[src]
Signs the provided BlindedToken
Returns None if the BlindedToken
point is not valid.
pub fn rederive_unblinded_token(&self, t: &TokenPreimage) -> UnblindedToken
[src]
Rederives an UnblindedToken
via the token preimage of the provided UnblindedToken
W' = T^k = H_1(t)^k
pub fn to_bytes(&self) -> [u8; 32]
[src]
Convert this SigningKey
to a byte array.
fn bytes_length_error() -> TokenError
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<SigningKey, TokenError>
[src]
Construct a SigningKey
from a slice of bytes.
Trait Implementations
impl Debug for SigningKey
[src]
impl Drop for SigningKey
[src]
Overwrite signing key with null when it goes out of scope.
Auto Trait Implementations
impl Send for SigningKey
impl Sync for SigningKey
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self