/** * Generates the server's credentials that are to be sent to the client. * @return The server's public value to the client */ public BigInteger generateServerCredentials() { BigInteger k = SRP6Util.calculateK(digest, N, g); this.b = selectPrivateValue(); this.B = k.multiply(v).mod(N).add(g.modPow(b, N)).mod(N); return B; }
/** * Generates the server's credentials that are to be sent to the client. * @return The server's public value to the client */ public BigInteger generateServerCredentials() { BigInteger k = SRP6Util.calculateK(digest, N, g); this.b = selectPrivateValue(); this.B = k.multiply(v).mod(N).add(g.modPow(b, N)).mod(N); return B; }