Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe.
This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper
"SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002"
Initialises the server to accept a new client authentication attempt
N The safe prime associated with the client's verifier
g The group parameter associated with the client's verifier
v The client's verifier
digest The digest algorithm associated with the client's verifier
random For key generation
Generates the server's credentials that are to be sent to the client.
- The server's public value to the client
Processes the client's credentials. If valid the shared secret is generated and returned.
Authenticates the received client evidence message M1 and saves it only if correct.
To be called after calculating the secret S.
"some data are missing from the previous operations (A,B,S)");
Computes the server evidence message M2 using the previously verified values.
To be called after successfully verifying the client evidence message M1.
"some data are missing from the previous operations (A,M1,S)");
Computes the final session key as a result of the SRP successful mutual authentication
To be called after calculating the server evidence message M2.
"some data are missing from the previous operations (S,M1,M2)");