---------------Connect成功--------------> 初始化 N, g
N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
g.SetDword(7);
I = USER //明文账号
---------------Challenge请求(I)---------> 读取DB -> v, s, p
首次通过 p 计算 v, s
s.SetRand(32 * 8);
x1 = hash(s, p)
x.SetBinary(x1, 20) (p = sha_pass_hash)
v = g ^ x % N
存入DB -> v, s
计算 B
b.SetRand(19 * 8);
k = 3 (SRP6a: k = hash(N, g))
b1 = g ^ b % N;
B = v * k + b1 % N
unk1.SetRand(16 * 8) ( or MD5(s) )
I = hash(USER) //账号 <------Challenge应答(B, g, N, s)---
p = hash(PASS) //密码
-----------
a.SetRand(32 * 8)
A = g ^ a % N
x1 = hash(s, p)
x.SetBinary(x1, 20)
-----------
u1 = hash(A, B)
u.SetBinary(u1, 20)
k = 3 (SRP6a: k = hash(N, g))
S1 = g ^ x % N
S2 = B - S1 * k
S3 = a + u * x
S = S1 ^ S2 % N
-----------非标准奇偶校验HASH算法
t1[20], t2[20], vK[40]
-----------偶数校验
for i := 0 to 15 do t1[i] = S[i*2]
H1 = hash(t1)
for i := 0 to 19 do vK[i*2] = H1[i]
-----------奇数校验
for i := 0 to 15 do t2[i] = S[i*2+1]
H2 = hash(t2)
for i := 0 to 19 do vK[i*2+1] = H2[i]
-----------HASH vK
K.SetBinary(vK, 40);
-----------XOR N,g
T1 = hash(N) , T2 = hash(g)
for i := 0 to 19 do T1[i] = T1[i] xor T2[i]
T.SetBinary(T1, 20);
M = hash(T, I, s, A, B, K)
----------------Proff请求(A, M)-----------> u1 = hash(A, B)
u.SetBinary(u1, 20)
S1 = v ^ u % N
S = (A * S1) ^ b % N
-----------非标准奇偶校验HASH算法
t1[20], t2[20], vK[40]
-----------偶数校验
for i := 0 to 15 do t1[i] = S[i*2]
H1 = hash(t1)
for i := 0 to 19 do vK[i*2] = sha[i]
-----------奇数校验
for i := 0 to 15 do t2[i] = S[i*2+1]
H2 = hash(t2)
for i := 0 to 19 do vK[i*2+1] = sha[i]
-----------HASH vK
K.SetBinary(vK, 40);
-----------XOR N,g
T1 = hash(N) , T2 = hash(g)
for i := 0 to 19 do T1[i] = T1[i] xor T2[i]
T.SetBinary(T1, 20);
M = hash(T, I, s, A, B, K)