private void genKeys() throws NoSuchAlgorithmException,
			InvalidKeySpecException {
		
		BigInteger tmp;
		BigInteger testRes;
		while (true) {
			tmp = genPrime(KEY_SIZE);
			testRes = on.divideAndRemainder(tmp)[1];
			if (testRes.compareTo(BigInteger.ZERO) != 0) {
				e = tmp;
				d = e.modInverse(on);
				return;
			}
		}
	}