private void generateNumber() { BigInteger nr; do { nr = BigIntegerRandom.getRandom(SIZE, rnd); } while (!bigIntIsPrime(nr)); prime = nr; }
private BigInteger selectE(BigInteger fi) { BigInteger e; Random rnd = new Random(); int size = fi.ToString().Length; do { e = BigIntegerRandom.getRandom(size, rnd); } while (BigInteger.GreatestCommonDivisor(e, fi) != 1); return(e); }