BigInteger lVal = params.getL();
int l = lVal == null ? 0 : lVal.intValue();
DHParameters dhParams = new DHParameters(params.getP(), params.getG(), null, l);
return new DHPrivateKeyParameters(derX.getValue(), dhParams);
}
else if (algId.getAlgorithm().equals(OIWObjectIdentifiers.elGamalAlgorithm))
{
ElGamalParameter params = new ElGamalParameter((ASN1Sequence)algId.getParameters());
ASN1Integer derX = (ASN1Integer)keyInfo.parsePrivateKey();