SRP in JavaScript

Radix: 10 16 64
1. Parameters

Modulus (N) =
Generator (g) =
Predefined values:


2. Password Database (server-side)

Setup the server's password verifier. Default password is password.

Username:
Password (server):
Salt (s) =
x =H(salt || H(username || ":" || password))
=
Verifier (v) =g^x (mod N)
=


3. Authentication Protocol

Authentication will succeed if the client password corresponds to the server's verifier entry (set above).

Client Server
a=b=
A=g^a (mod N)B=v + g^b (mod N)
==
Password (client):u=
x=v=
S=(B - g^x) ^ (a + ux) (mod N)S=(Av^u) ^ b (mod N)
==