Struct ServerAuthenticationWorkflow

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

Server-side of the authentication workflow

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

Implementations§

Source§

impl<'s, D: Digest> ServerAuthenticationWorkflow<'s, D>

Source

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

Source

pub fn step2(&self, params: ServerStep2Params<'_>) -> Result<ServerStep2Result>

step2: server creates ephemeral key from random bytes and stored verifier

The private key server_private_b must not be exposed, but needs to be stored for future steps. The public key server_public_b and the salt must be sent to the client.

receive: client_public_a from client keep: server_private_a, client_public_b send: server_public_a, salt to client

Source

pub fn step4( &self, params: ServerStep4Params<'_>, ) -> Result<ServerStep4Result<D>>

step4: server-side: generate verifier

the proof() of the result should be sent to the client

Auto Trait Implementations§

§

impl<'s, D> Freeze for ServerAuthenticationWorkflow<'s, D>

§

impl<'s, D> RefUnwindSafe for ServerAuthenticationWorkflow<'s, D>
where D: RefUnwindSafe,

§

impl<'s, D> Send for ServerAuthenticationWorkflow<'s, D>
where D: Send,

§

impl<'s, D> Sync for ServerAuthenticationWorkflow<'s, D>
where D: Sync,

§

impl<'s, D> Unpin for ServerAuthenticationWorkflow<'s, D>
where D: Unpin,

§

impl<'s, D> UnwindSafe for ServerAuthenticationWorkflow<'s, 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.