![JAR search and dependency download from the Maven repository](/logo.png)
org.bouncycastle.crypto.params.ECNamedDomainParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-jdk14 Show documentation
Show all versions of bcprov-jdk14 Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.4.
The newest version!
package org.bouncycastle.crypto.params;
import java.math.BigInteger;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x9.ECNamedCurveTable;
import org.bouncycastle.asn1.x9.X9ECParameters;
import org.bouncycastle.crypto.ec.CustomNamedCurves;
import org.bouncycastle.math.ec.ECConstants;
import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPoint;
public class ECNamedDomainParameters
extends ECDomainParameters
{
public static ECNamedDomainParameters lookup(ASN1ObjectIdentifier name)
{
X9ECParameters x9 = CustomNamedCurves.getByOID(name);
if (x9 == null)
{
x9 = ECNamedCurveTable.getByOID(name);
}
return new ECNamedDomainParameters(name, x9);
}
private ASN1ObjectIdentifier name;
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n)
{
this(name, curve, G, n, ECConstants.ONE, null);
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n, BigInteger h)
{
this(name, curve, G, n, h, null);
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECCurve curve, ECPoint G, BigInteger n, BigInteger h, byte[] seed)
{
super(curve, G, n, h, seed);
this.name = name;
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, ECDomainParameters domainParameters)
{
super(domainParameters.getCurve(), domainParameters.getG(), domainParameters.getN(), domainParameters.getH(), domainParameters.getSeed());
this.name = name;
}
public ECNamedDomainParameters(ASN1ObjectIdentifier name, X9ECParameters x9)
{
super(x9);
this.name = name;
}
public ASN1ObjectIdentifier getName()
{
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy