fact = KeyFactory.getInstance("RSA", provider);
return new PGPPrivateKey(fact.generatePrivate(rsaPrivSpec), this.getKeyID());
case PGPPublicKey.DSA:
DSAPublicBCPGKey dsaPub = (DSAPublicBCPGKey)pubPk.getKey();
DSASecretBCPGKey dsaPriv = new DSASecretBCPGKey(in);
DSAPrivateKeySpec dsaPrivSpec =
new DSAPrivateKeySpec(dsaPriv.getX(), dsaPub.getP(), dsaPub.getQ(), dsaPub.getG());
fact = KeyFactory.getInstance("DSA", provider);
return new PGPPrivateKey(fact.generatePrivate(dsaPrivSpec), this.getKeyID());
case PGPPublicKey.ELGAMAL_ENCRYPT: