/** * Generates the secret S given the server's credentials * @param serverB The server's credentials * @return Client's verification message for the server * @throws CryptoException If server's credentials are invalid */ 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 the secret S given the server's credentials * @param serverB The server's credentials * @return Client's verification message for the server * @throws CryptoException If server's credentials are invalid */ 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; }