Struct srp6::Srp6 [−][src]
pub struct Srp6<const KEY_LENGTH: usize, const SALT_LENGTH: usize> {
pub N: PrimeModulus,
pub g: Generator,
pub k: MultiplierParameter,
}
Expand description
Main interaction point for the server
Fields
N: PrimeModulus
A large safe prime (N = 2q+1, where q is prime. All arithmetic is done modulo N.
KEY_LENGTH
needs to match the bytes of PrimeModulus
N
g: Generator
A generator modulo N
k: MultiplierParameter
multiplier parameter
Implementations
Trait Implementations
fn generate_new_user_secrets(
&self,
I: UsernameRef<'_>,
p: &ClearTextPassword
) -> (Salt, PasswordVerifier)
fn generate_new_user_secrets(
&self,
I: UsernameRef<'_>,
p: &ClearTextPassword
) -> (Salt, PasswordVerifier)
creates a new Salt
s
and PasswordVerifier
v
for a new user
fn start_handshake(
&self,
user: &UserDetails
) -> (Handshake<KEY_LENGTH, SALT_LENGTH>, HandshakeProofVerifier)
fn start_handshake(
&self,
user: &UserDetails
) -> (Handshake<KEY_LENGTH, SALT_LENGTH>, HandshakeProofVerifier)
starts a session handshake for a given user
Salt
s
and PasswordVerifier
p
are both user specific,
initially they are generated by HostAPI::generate_new_user_secrets()