pub struct Spake2<G: Group> { /* private fields */ }
Expand description
SPAKE2 algorithm.
Implementations§
source§impl<G: Group> Spake2<G>
impl<G: Group> Spake2<G>
sourcepub fn start_a(
password: &Password,
id_a: &Identity,
id_b: &Identity
) -> (Spake2<G>, Vec<u8>)
Available on crate feature getrandom
only.
pub fn start_a( password: &Password, id_a: &Identity, id_b: &Identity ) -> (Spake2<G>, Vec<u8>)
getrandom
only.Start with identity idA
.
Uses the system RNG.
sourcepub fn start_b(
password: &Password,
id_a: &Identity,
id_b: &Identity
) -> (Spake2<G>, Vec<u8>)
Available on crate feature getrandom
only.
pub fn start_b( password: &Password, id_a: &Identity, id_b: &Identity ) -> (Spake2<G>, Vec<u8>)
getrandom
only.Start with identity idB
.
Uses the system RNG.
sourcepub fn start_symmetric(
password: &Password,
id_s: &Identity
) -> (Spake2<G>, Vec<u8>)
Available on crate feature getrandom
only.
pub fn start_symmetric( password: &Password, id_s: &Identity ) -> (Spake2<G>, Vec<u8>)
getrandom
only.Start with symmetric identity.
Uses the system RNG.
sourcepub fn start_a_with_rng(
password: &Password,
id_a: &Identity,
id_b: &Identity,
csrng: impl CryptoRng + RngCore
) -> (Spake2<G>, Vec<u8>)
pub fn start_a_with_rng( password: &Password, id_a: &Identity, id_b: &Identity, csrng: impl CryptoRng + RngCore ) -> (Spake2<G>, Vec<u8>)
Start with identity idA
and the provided cryptographically secure RNG.
sourcepub fn start_b_with_rng(
password: &Password,
id_a: &Identity,
id_b: &Identity,
csrng: impl CryptoRng + RngCore
) -> (Spake2<G>, Vec<u8>)
pub fn start_b_with_rng( password: &Password, id_a: &Identity, id_b: &Identity, csrng: impl CryptoRng + RngCore ) -> (Spake2<G>, Vec<u8>)
Start with identity idB
and the provided cryptographically secure RNG.
Trait Implementations§
source§impl<G: PartialEq + Group> PartialEq<Spake2<G>> for Spake2<G>where
G::Scalar: PartialEq,
impl<G: PartialEq + Group> PartialEq<Spake2<G>> for Spake2<G>where G::Scalar: PartialEq,
impl<G: Eq + Group> Eq for Spake2<G>where G::Scalar: Eq,
impl<G: Group> StructuralEq for Spake2<G>
impl<G: Group> StructuralPartialEq for Spake2<G>
Auto Trait Implementations§
impl<G> RefUnwindSafe for Spake2<G>where <G as Group>::Scalar: RefUnwindSafe,
impl<G> Send for Spake2<G>where <G as Group>::Scalar: Send,
impl<G> Sync for Spake2<G>where <G as Group>::Scalar: Sync,
impl<G> Unpin for Spake2<G>where <G as Group>::Scalar: Unpin,
impl<G> UnwindSafe for Spake2<G>where <G as Group>::Scalar: 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