Struct challenge_bypass_ristretto::voprf::UnblindedToken
source · [−]#[repr(C)]pub struct UnblindedToken {
pub t: TokenPreimage,
W: CompressedRistretto,
}
Expand description
An UnblindedToken
is the result of unblinding a SignedToken
.
While both the client and server both “know” this value, it should nevertheless not be sent between the two.
Fields
t: TokenPreimage
t
is the TokenPreimage
W: CompressedRistretto
W
is the unblinded signed CompressedRistretto
point
\(W = Q^{1/r} = P^{k(1/r)} = T^{rk(1/r)} = T^k\)
Implementations
sourceimpl UnblindedToken
impl UnblindedToken
sourcepub fn derive_verification_key<D>(&self) -> VerificationKey where
D: Digest<OutputSize = U64> + Default,
pub fn derive_verification_key<D>(&self) -> VerificationKey where
D: Digest<OutputSize = U64> + Default,
Derive the VerificationKey
for this particular UnblindedToken
fn bytes_length_error() -> TokenError
sourcepub fn from_bytes(bytes: &[u8]) -> Result<UnblindedToken, TokenError>
pub fn from_bytes(bytes: &[u8]) -> Result<UnblindedToken, TokenError>
Construct a UnblindedToken
from a slice of bytes.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UnblindedToken
impl Send for UnblindedToken
impl Sync for UnblindedToken
impl Unpin for UnblindedToken
impl UnwindSafe for UnblindedToken
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more