|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ecc.ecdsa.ECDSAParameter
Specifies the domain parameter for the ecc algorithms. This class doesn't perform a parameter validation. Subclasses may add this feature.
The domain parameters are:
Field Summary | |
protected java.math.BigInteger |
c_
the output c of the SHA-1 based algorithm |
protected static boolean |
DEFAULT_OID_ENCODING
Indicates if the domain parameters should be referenced by their oids (whenever possible) or explicitely specified. |
static iaik.asn1.INTEGER |
ECDSA_PARAMETER_VERSION
The version field in the ECDSA ASN.1 structure |
protected ECPoint |
g_
the base point |
protected java.math.BigInteger |
k_
the cofactor = #E / r |
protected java.lang.String |
oid_
The Object Identifier for these domain parameters or null if not defined. |
protected java.math.BigInteger |
r_
the order of the base point g_ |
protected java.math.BigInteger |
s_
the 160-bit input seed s to the SHA-1 based algorithm |
Constructor Summary | |
protected |
ECDSAParameter()
Subclasses use this constructor |
|
ECDSAParameter(ECCParameterSpec parameter)
Creates an ECDSA parameter set from the given ECC parameters. |
|
ECDSAParameter(ECCParameterSpec parameter,
int coordinates)
Creates an ECDSA parameter set from the given ECC parameters. |
Method Summary | |
boolean |
equals(java.lang.Object other)
Compares 2 Parameters. |
java.math.BigInteger |
getC()
|
static boolean |
getDefaultOIDEncoding()
This method returns the default encoding policy (ECDSA domain parameters may be specified either explicitely or just as oid). |
ECPoint |
getG()
The generator of the subgroub of order r. |
java.math.BigInteger |
getK()
|
java.lang.String |
getOID()
|
java.math.BigInteger |
getR()
|
java.math.BigInteger |
getS()
|
int |
hashCode()
Returns the hash code of this ECDSAParameters. |
static void |
setDefaultOIDEncoding(boolean useOID)
Sets the default parameter encoding. |
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: 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 } |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final iaik.asn1.INTEGER ECDSA_PARAMETER_VERSION
toASN1Object()
protected static boolean DEFAULT_OID_ENCODING
protected java.math.BigInteger c_
protected ECPoint g_
protected java.math.BigInteger k_
protected java.lang.String oid_
null
if not defined.
protected java.math.BigInteger r_
protected java.math.BigInteger s_
Constructor Detail |
public ECDSAParameter(ECCParameterSpec parameter) throws ECCException
parameter
- the given parameters (must be a valid set of parameters !!)
ECCException
- if the ec group instantiation failed.public ECDSAParameter(ECCParameterSpec parameter, int coordinates) throws ECCException
parameter
- the given parameters (must be a valid set of parameters !!)coordinates
- decides, which type of coordinates to use. One of the constants defined in this class.
ECCException
- if the ec group instantiation failed.protected ECDSAParameter()
Method Detail |
public static boolean getDefaultOIDEncoding()
public static void setDefaultOIDEncoding(boolean useOID)
useOID
- if true (default) the domain parameters are referenced by their oid (if possible)public boolean equals(java.lang.Object other)
other
- the other parameter, must be an instance
of this class otherwise false will be returned.
public java.math.BigInteger getC()
getC
in interface ECDSAParams
null
if unkonownpublic ECPoint getG()
ECDSAParams
getG
in interface ECDSAParams
ECDSAParams.getR()
public java.math.BigInteger getK()
getK
in interface ECDSAParams
null
if not known.public java.lang.String getOID()
getOID
in interface ECDSAParams
null
if unknownpublic java.math.BigInteger getR()
getR
in interface ECDSAParams
public java.math.BigInteger getS()
getS
in interface ECDSAParams
null
if unknownpublic int hashCode()
public iaik.asn1.ASN1Object toASN1Object()
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 }
public java.lang.String toString()
|
IAIK ECC version 2.18 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |