public class ECParameterSpec extends ECParameterSpec implements Cloneable
References:
[1] ANSI X9.62-2005, "American National Standard for Financial Services - The Elliptic Curve Digital Signature Algorithm (ECDSA)" , ASC X9, November 2005.
AlgorithmParameterSpec,
ECStandardizedParameterFactory| Modifier | Constructor and Description |
|---|---|
protected |
ECParameterSpec(EllipticCurve curve,
ECPoint g,
BigInteger order,
int h,
iaik.asn1.structures.AlgorithmID hashAlgorithm,
String oid)
Creates a new
ECParameterSpec instance. |
protected |
ECParameterSpec(EllipticCurve curve,
ECPoint g,
BigInteger order,
int h,
iaik.asn1.structures.AlgorithmID hashAlgorithm,
String oid,
BigInteger endomorphismAux0,
BigInteger endomorphismAux1)
Creates a new
ECParameterSpec instance. |
| Modifier and Type | Method and Description |
|---|---|
ECParameterSpec |
clone()
Creates a clone of this ECParameterSpec.
|
static ECParameterSpec |
decode(iaik.asn1.ASN1Object parameters)
Creates a new
ECParameterSpec object from the specified ASN.1
structure. |
boolean |
equals(Object obj) |
EllipticCurve |
getCurve() |
BigInteger |
getEndomorphismAux0()
Returns the first auxiliary value for various endomorphisms.
|
BigInteger |
getEndomorphismAux1()
Returns the first auxiliary value for various endomorphisms.
|
iaik.asn1.structures.AlgorithmID |
getHashAlgorithmID()
Returns the algorithm identifier of the hash algorithm that was used to
create the curve and/or the generator.
|
String |
getOID()
Returns the object identifier of the specified curve.
|
static ECParameterSpec |
getParameterSpec(ECParameterSpec params)
Returns a new
ECParameterSpec instance. |
static ECParameterSpec |
getParameterSpec(EllipticCurve curve,
ECPoint g,
BigInteger order,
int h,
iaik.asn1.structures.AlgorithmID hashAlgorithm,
String oid)
Returns a new
ECParameterSpec instance. |
int |
hashCode() |
static void |
setDefaultOIDEncoding(boolean enable)
Allows the user to set, whether domain parameters should be encoded as OID
wherever possible, by default.
|
iaik.asn1.ASN1Object |
toASN1Object()
If the default encoding is set to oid encoding this method just returns the
ObjectID otherwise the following ASN.1 structure: |
String |
toString()
Returns a human readable
String containing the base point, the
order, and the elliptic curve. |
static boolean |
usesDefaultOIDEncoding()
Returns
true, if OID encoding is switched on. |
getCofactor, getGenerator, getOrderprotected ECParameterSpec(EllipticCurve curve, ECPoint g, BigInteger order, int h, iaik.asn1.structures.AlgorithmID hashAlgorithm, String oid)
ECParameterSpec instance.curve - the elliptic curveg - the generatororder - the order of the generatorh - the cofactorhashAlgorithm - the hashAlgorithm that was used to generate the curve and/or the
generatoroid - a String representing the object identifier of the curveprotected ECParameterSpec(EllipticCurve curve, ECPoint g, BigInteger order, int h, iaik.asn1.structures.AlgorithmID hashAlgorithm, String oid, BigInteger endomorphismAux0, BigInteger endomorphismAux1)
ECParameterSpec instance.curve - the elliptic curveg - the generatororder - the order of the generatorh - the cofactorhashAlgorithm - the hashAlgorithm that was used to generate the curve and/or the
generatoroid - a String representing the object identifier of the curveendomorphismAux0 - the auxiliary value for different endomorphismsendomorphismAux1 - the auxiliary value for different endomorphismspublic static ECParameterSpec getParameterSpec(EllipticCurve curve, ECPoint g, BigInteger order, int h, iaik.asn1.structures.AlgorithmID hashAlgorithm, String oid) throws InvalidCurveParameterSpecException
ECParameterSpec instance.curve - the elliptic curveg - the generator of the curve grouporder - the order of the generatorh - the cofactor of the curvehashAlgorithm - the hashAlgorithm that was used to generate the curve and/or the
generatoroid - a String representing the object identifier of the curveInvalidCurveParameterSpecException - in case the curve parameter validation failedpublic static ECParameterSpec getParameterSpec(ECParameterSpec params) throws InvalidCurveParameterSpecException
ECParameterSpec instance.params - a JDK parameter specInvalidCurveParameterSpecException - in case the curve parameter validation failedpublic EllipticCurve getCurve()
getCurve in class ECParameterSpecpublic iaik.asn1.structures.AlgorithmID getHashAlgorithmID()
public String getOID()
String holding the object identifierpublic iaik.asn1.ASN1Object toASN1Object()
ObjectID otherwise the following ASN.1 structure:
ECParameters ::= SEQUENCE { -- Elliptic curve parameters
version ECPVer,
fieldID FieldID,
curve Curve,
base ECPoint, -- Base point G
order INTEGER, -- Order n of the base point
cofactor INTEGER OPTIONAL, -- The integer h = #E(Fq)/n
hash HashAlgorithm OPTIONAL -- The hash algorithm that was used to generate the curve and/or the generator
}
ASN1Object instancepublic static ECParameterSpec decode(iaik.asn1.ASN1Object parameters)
ECParameterSpec object from the specified ASN.1
structure.parameters - the ASN.1 objectASN1Object instanceIllegalArgumentException - if the ASN.1 structure doen't contain valid parameterstoASN1Object()public static void setDefaultOIDEncoding(boolean enable)
enable - if true, it enables the OID encoding of parameterspublic static boolean usesDefaultOIDEncoding()
true, if OID encoding is switched on.true, if OID encoding is switched onpublic String toString()
String containing the base point, the
order, and the elliptic curve.public BigInteger getEndomorphismAux0()
public BigInteger getEndomorphismAux1()
public ECParameterSpec clone()
The clone is not deep, i.e. the fields of this ECParameterSpec are only copied, not cloned.
Copyright © 2011–2022 Stiftung SIC. All rights reserved.