protected virtual BigInteger SelectPrivateValue() { return(Srp6Utilities.GeneratePrivateValue(digest, N, g, random)); }
public virtual BigInteger GenerateVerifier(byte[] salt, byte[] identity, byte[] password) { BigInteger e = Srp6Utilities.CalculateX(this.digest, this.N, salt, identity, password); return(this.g.ModPow(e, this.N)); }
/** * Creates a new SRP verifier * @param salt The salt to use, generally should be large and random * @param identity The user's identifying information (eg. username) * @param password The user's password * @return A new verifier for use in future SRP authentication */ public virtual BigInteger GenerateVerifier(byte[] salt, byte[] identity, byte[] password) { BigInteger x = Srp6Utilities.CalculateX(digest, N, salt, identity, password); return(g.ModPow(x, N)); }
protected virtual BigInteger SelectPrivateValue() { return(Srp6Utilities.GeneratePrivateValue(param.N, random)); }
/** * Initialises the server to accept a new client authentication attempt * @param N The safe prime associated with the client's verifier * @param g The group parameter associated with the client's verifier * @param v The client's verifier * @param digest The digest algorithm associated with the client's verifier * @param random For key generation */ public Srp6Server(SrpConstants param, BigInteger v) { this.param = param; this.v = v; this.privB = Srp6Utilities.GeneratePrivateValue(param.N, new SecureRandom()); }