/** * 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 BigInteger generateVerifier(byte[] salt, byte[] identity, byte[] password) { BigInteger x = SRP6Util.calculateX(digest, N, salt, identity, password); return g.modPow(x, 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 BigInteger generateVerifier(byte[] salt, byte[] identity, byte[] password) { BigInteger x = SRP6Util.calculateX(digest, N, salt, identity, password); return g.modPow(x, N); } }
/** * Generates client's credentials given the client's salt, identity and password * @param salt The salt used in the client's verifier. * @param identity The user's identity (eg. username) * @param password The user's password * @return Client's public value to send to server */ 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 * @param salt The salt used in the client's verifier. * @param identity The user's identity (eg. username) * @param password The user's password * @return Client's public value to send to server */ 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; }