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§
impl<G: Eq + Group> Eq for Spake2<G>
impl<G: Group> StructuralPartialEq for Spake2<G>
Auto Trait Implementations§
impl<G> Freeze for Spake2<G>
impl<G> RefUnwindSafe for Spake2<G>
impl<G> Send for Spake2<G>
impl<G> Sync for Spake2<G>
impl<G> Unpin for Spake2<G>
impl<G> UnwindSafe for Spake2<G>
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