PrivateKey newSecK = new DHKeyPairPKCS8Codec().decodePrivateKey(pk);
harness.check(secK.equals(newSecK),
"DH private key ASN.1 encoder/decoder test");
pk = ((GnuDHPublicKey) pubK).getEncoded(IKeyPairCodec.X509_FORMAT);
PublicKey newPubK = new DHKeyPairX509Codec().decodePublicKey(pk);
harness.check(pubK.equals(newPubK),
"DH public key ASN.1 encoder/decoder test");
}