}
public void setPrivateKey(ByteBuf keyBuf) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeySpecException {
BigInteger x = BigIntegerUtils.fromBuf( keyBuf );
DHPrivateKeySpec keySpec = new DHPrivateKeySpec(x, this.desc.getP(), this.desc.getG());
KeyFactory keyFactory = KeyFactory.getInstance("DH", "BC");
PrivateKey privateKey = keyFactory.generatePrivate(keySpec);
if ( this.keys == null ) {