BigInteger q = p.subtract(BigInteger.ONE).shiftRight(1);
do {
x = new BigInteger(q.bitLength(), rnd);
} while (x.compareTo(q) >= 0);
e = G.modPow(x, p);
KexDHInitMessage init = new KexDHInitMessage();
init.setE(e);
transport.writeMessage(init);
KexDHReplyMessage reply = (KexDHReplyMessage)transport
.readMessage(NAMESPACE);
BigInteger f = reply.getF();