| Method from org.bouncycastle.crypto.agreement.srp.SRP6Client Detail: |
public BigInteger calculateSecret(BigInteger serverB) throws CryptoException {
this.B = SRP6Util.validatePublicValue(N, serverB);
this.u = SRP6Util.calculateU(digest, N, A, B);
this.S = calculateS();
return S;
}
Generates client's verification message given the server's credentials |
public BigInteger generateClientCredentials(byte[] salt,
byte[] identity,
byte[] password) {
this.x = SRP6Util.calculateX(digest, N, salt, identity, password);
this.a = selectPrivateValue();
this.A = g.modPow(a, N);
return A;
}
Generates client's credentials given the client's salt, identity and password |
public void init(BigInteger N,
BigInteger g,
Digest digest,
SecureRandom random) {
this.N = N;
this.g = g;
this.digest = digest;
this.random = random;
}
Initialises the client to begin new authentication attempt |
protected BigInteger selectPrivateValue() {
return SRP6Util.generatePrivateValue(digest, N, g, random);
}
|