pub struct Spake2pVerifier { /* private fields */ }Available on crate feature
rustcrypto only.Expand description
The verifier: a commissionee that stores (w0, L) and never saw w1 (§3.10).
Implementations§
Source§impl Spake2pVerifier
impl Spake2pVerifier
Sourcepub fn new(data: &Spake2pVerifierData, random: &[u8; 32]) -> Result<Self>
pub fn new(data: &Spake2pVerifierData, random: &[u8; 32]) -> Result<Self>
Starts an exchange from stored verifier data.
random must be 32 octets of cryptographically secure randomness — the ephemeral
scalar y.
Sourcepub fn from_parts(w0: &[u8; 32], l: &[u8; 65], y: &[u8; 32]) -> Result<Self>
pub fn from_parts(w0: &[u8; 32], l: &[u8; 65], y: &[u8; 32]) -> Result<Self>
Starts an exchange from w0 and L directly, with an explicit y.
The counterpart of Spake2pProver::from_parts, and what the published test
vectors need.
Sourcepub fn finish(
&self,
pa: &[u8; 65],
context: &[u8],
) -> Result<(Confirmation, Confirmation, SharedSecret)>
pub fn finish( &self, pa: &[u8; 65], context: &[u8], ) -> Result<(Confirmation, Confirmation, SharedSecret)>
Given the commissioner’s pA, derives the keys and the confirmations.
Returns (cA to expect, cB to send, Ke).
Sourcepub fn finish_with_identities(
&self,
pa: &[u8; 65],
context: &[u8],
prover_identity: &[u8],
verifier_identity: &[u8],
) -> Result<(Confirmation, Confirmation, SharedSecret)>
pub fn finish_with_identities( &self, pa: &[u8; 65], context: &[u8], prover_identity: &[u8], verifier_identity: &[u8], ) -> Result<(Confirmation, Confirmation, SharedSecret)>
Spake2pVerifier::finish with explicit SPAKE2+ identities. See
Spake2pProver::finish_with_identities.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Spake2pVerifier
impl Freeze for Spake2pVerifier
impl Move for Spake2pVerifier
impl RefUnwindSafe for Spake2pVerifier
impl Send for Spake2pVerifier
impl Sync for Spake2pVerifier
impl Unpin for Spake2pVerifier
impl UnsafeUnpin for Spake2pVerifier
impl UnwindSafe for Spake2pVerifier
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