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>
impl<'c, D: Digest> ClientAuthenticationWorkflow<'c, D>
Sourcepub fn new(group: &'c SrpGroup) -> Self
pub fn new(group: &'c SrpGroup) -> Self
Create a new instance
group
specifies the group (safe prime n
and generator g
) used
for SRP.
Sourcepub fn step1(&self) -> Result<ClientStep1Result>
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
Sourcepub fn step3(
&self,
params: ClientStep3Params<'_>,
) -> Result<ClientStep3Result<D>>
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.