Struct ClientAuthenticationWorkflow

Source
pub struct ClientAuthenticationWorkflow<'c, D: Digest> { /* private fields */ }
Expand description

Client-side of the authentication workflow

This struct should be used on the client side to authenticate against a compatible SRP6a server. Digest D specifies the digest algorithm used and therefore also implicitly defines the key size of the common secret key.

Implementations§

Source§

impl<'c, D: Digest> ClientAuthenticationWorkflow<'c, D>

Source

pub fn new(group: &'c SrpGroup) -> Self

Create a new instance

group specifies the group (safe prime n and generator g) used for SRP.

Source

pub fn step1(&self) -> Result<ClientStep1Result>

step 1: create ephemeral key

The generated private key client_private_a must not be exposed, but needs to be stored for future steps. The generated public key client_public_a and the username of the user should be sent to the server.

keep: client_private_a send: (username, client_public_a) to the server

Source

pub fn step3( &self, params: ClientStep3Params<'_>, ) -> Result<ClientStep3Result<D>>

step 3: process server reply and send proof

receive: (salt, server_public_b) from server keep: ClientStep3Result struct or at least key send: proof to server.

Auto Trait Implementations§

§

impl<'c, D> Freeze for ClientAuthenticationWorkflow<'c, D>

§

impl<'c, D> RefUnwindSafe for ClientAuthenticationWorkflow<'c, D>
where D: RefUnwindSafe,

§

impl<'c, D> Send for ClientAuthenticationWorkflow<'c, D>
where D: Send,

§

impl<'c, D> Sync for ClientAuthenticationWorkflow<'c, D>
where D: Sync,

§

impl<'c, D> Unpin for ClientAuthenticationWorkflow<'c, D>
where D: Unpin,

§

impl<'c, D> UnwindSafe for ClientAuthenticationWorkflow<'c, D>
where D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.