for (;;) { this.p = new BigInteger(B - qs, 1, rng); if (this.p.subtract(BigInteger.ONE) .gcd(ee) .compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) break if (this.q.subtract(BigInteger.ONE) .gcd(ee) .compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) break this.q = t var p1 = this.p.subtract(BigInteger.ONE); var q1 = this.q.subtract(BigInteger.ONE); var phi = p1.multiply(q1); if (phi.gcd(ee) .compareTo(BigInteger.ONE) == 0) { this.n = this.p.multiply(this.q); this.d = ee.modInverse(phi);