Struct srp6::Handshake [−][src]
pub struct Handshake<const KEY_LENGTH: usize, const SALT_LENGTH: usize> { pub B: PublicKey, pub g: Generator, pub N: PrimeModulus, pub k: MultiplierParameter, pub s: Salt, }
Expand description
Contains all variables needed for a successful session key generation provided by the server to the client
Fields
B: PublicKey
the servers public key
g: Generator
a generator modulo N
N: PrimeModulus
a big and safe prime number
k: MultiplierParameter
multiplier parameter
s: Salt
the users salt
Implementations
pub fn calculate_proof(
&self,
username: UsernameRef<'_>,
password: &ClearTextPassword
) -> Result<(HandshakeProof<KEY_LENGTH, SALT_LENGTH>, StrongProofVerifier<KEY_LENGTH>)>
pub fn calculate_proof(
&self,
username: UsernameRef<'_>,
password: &ClearTextPassword
) -> Result<(HandshakeProof<KEY_LENGTH, SALT_LENGTH>, StrongProofVerifier<KEY_LENGTH>)>
client proof calculation User: x = H(s, p) (user enters password) User: S = (B - kg^x) ^ (a + ux) (computes session key) User: K = H(S)
Trait Implementations
Auto Trait Implementations
impl<const KEY_LENGTH: usize, const SALT_LENGTH: usize> RefUnwindSafe for Handshake<KEY_LENGTH, SALT_LENGTH>
impl<const KEY_LENGTH: usize, const SALT_LENGTH: usize> Unpin for Handshake<KEY_LENGTH, SALT_LENGTH>
impl<const KEY_LENGTH: usize, const SALT_LENGTH: usize> UnwindSafe for Handshake<KEY_LENGTH, SALT_LENGTH>