}
if (selected.isEmpty()) {
log.warn("No suitable primes found, defaulting to DHG1");
return getDH(new BigInteger(DHGroupData.getG()), new BigInteger(DHGroupData.getP1()));
}
Random random = session.getFactoryManager().getRandomFactory().create();
int which = random.random(selected.size());
Moduli.DhGroup group = selected.get(which);
return getDH(group.p, group.g);
}