fact = KeyFactory.getInstance("DSA", provider);
return new PGPPrivateKey(fact.generatePrivate(dsaPrivSpec), this.getKeyID());
case PGPPublicKey.ELGAMAL_ENCRYPT:
case PGPPublicKey.ELGAMAL_GENERAL:
ElGamalPublicBCPGKey elPub = (ElGamalPublicBCPGKey)pubPk.getKey();
ElGamalSecretBCPGKey elPriv = new ElGamalSecretBCPGKey(in);
ElGamalPrivateKeySpec elSpec = new ElGamalPrivateKeySpec(elPriv.getX(), new ElGamalParameterSpec(elPub.getP(), elPub.getG()));
fact = KeyFactory.getInstance("ElGamal", provider);
return new PGPPrivateKey(fact.generatePrivate(elSpec), this.getKeyID());
default: