pub struct Prover<C: Spake2PlusCiphersuite>(/* private fields */);Expand description
SPAKE2+ Prover: generates the first message and processes the Verifier’s response.
Implementations§
Source§impl<C: Spake2PlusCiphersuite> Prover<C>
impl<C: Spake2PlusCiphersuite> Prover<C>
Sourcepub fn start(
w0: &<C::Group as CpaceGroup>::Scalar,
w1: &<C::Group as CpaceGroup>::Scalar,
context: &[u8],
id_prover: &[u8],
id_verifier: &[u8],
rng: &mut impl CryptoRngCore,
) -> Result<(Vec<u8>, ProverState<C>), Spake2PlusError>
pub fn start( w0: &<C::Group as CpaceGroup>::Scalar, w1: &<C::Group as CpaceGroup>::Scalar, context: &[u8], id_prover: &[u8], id_verifier: &[u8], rng: &mut impl CryptoRngCore, ) -> Result<(Vec<u8>, ProverState<C>), Spake2PlusError>
Start the SPAKE2+ protocol as the Prover.
w0 and w1 are the password-derived scalars. The caller is responsible
for password stretching.
Returns (shareP_bytes, state) where shareP_bytes is sent to the Verifier.
Auto Trait Implementations§
impl<C> Freeze for Prover<C>
impl<C> RefUnwindSafe for Prover<C>where
C: RefUnwindSafe,
impl<C> Send for Prover<C>where
C: Send,
impl<C> Sync for Prover<C>where
C: Sync,
impl<C> Unpin for Prover<C>where
C: Unpin,
impl<C> UnsafeUnpin for Prover<C>
impl<C> UnwindSafe for Prover<C>where
C: UnwindSafe,
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