The trait that defines the calculations required on the client side- S, a, x and A
The base trait that defines N, g, k, u SRP parameters and provides functionality to generate random bytes, and g ^ x (mod N). The SRP parameters are calculated using SRp version 6a.
The trait that needs to be extended to get SRP server side computations.
The trait that defines the calculations required on the server side- S, x, v and B
Server for SRP authentication as implemented in Vector.
The SRP 6a version as defined at http://srp.stanford.edu/.
The SRP 6a version as defined at http://srp.stanford.edu/. Design: http://srp.stanford.edu/design.html
The following is a description of SRP-6 and 6a, the latest versions of SRP: N A large safe prime (N = 2q+1, where q is prime) All arithmetic is done modulo N. g A generator modulo N k Multiplier parameter (k = H(N, g) in SRP-6a, k = 3 for legacy SRP-6) s User's salt I Username p Cleartext Password H() One-way hash function (Modular) Exponentiation u Random scrambling parameter a,b Secret ephemeral values A,B Public ephemeral values x Private key (derived from p and s) v Password verifier The host stores passwords using the following formula: x = H(s, p) (s is chosen randomly) v = gx (computes password verifier) The host then keeps {I, s, v} in its password database. The authentication protocol itself goes as follows: User -> Host: I, A = ga (identifies self, a = random number) Host -> User: s, B = kv + gb (sends salt, b = random number) Both: u = H(A, B) User: x = H(s, p) (user enters password) User: S = (B - kgx) (a + ux) (computes session key) User: K = H(S) Host: S = (Avu) b (computes session key) Host: K = H(S)
Contains some Vector
constants to be used while authenticating and what algorithm to use
Performs authentication to Vector
with SRP (Secure Remote Password) protocol
Server for SRP authentication as implemented in Vector.
Before use, user credentials need to be saved by the server, i.e. calling the
saveUserCredentials
method