do {
e = new BigInteger(bitLength, GENERATOR);
} while(e.compareTo(BigInteger.ONE) <= 0
|| e.compareTo(phiN) >= 0
|| e.gcd(phiN).compareTo(BigInteger.ONE) != 0);
BigInteger d = e.modInverse(phiN);
keys[0] = new keyPair(n, e);
keys[1] = new keyPair(n, d);