IAIK ECC
version 2.18

iaik.security.ecc.parameter
Class ECCParameterFactory

java.lang.Object
  extended byiaik.security.ecc.parameter.ECCParameterFactory

public class ECCParameterFactory
extends java.lang.Object

Collection of elliptic curve and domain parameters. Implemented as a singleton. Use the static getInstance() method. Parameters are either referenced by their names (case insensitive) or by their oid, or both.


Method Summary
 void addECCParameter(java.lang.String parameterName, java.lang.String oid, java.math.BigInteger p, java.math.BigInteger k, java.math.BigInteger r, java.math.BigInteger s, java.math.BigInteger c, java.math.BigInteger a, java.math.BigInteger b, java.math.BigInteger gx, java.math.BigInteger gy)
          Adds ECC parameters to the repository of the factory.
 void addECCParameter(java.lang.String parameterName, java.lang.String oid, int[] irreducible, java.math.BigInteger k, java.math.BigInteger r, int[] a, int[] b, int[] gx, int[] gy)
          Adds ECC parameters to the repository of the factory.
 void clearAll()
          Clears all ecc parameters.
static void deleteInstance()
           
static ECCParameterFactory getInstance()
          Singleton method to get an instance of this class.
 java.util.Enumeration getNames()
           
 ECCParameterSpec getParameterByName(java.lang.String name)
           
 ECCParameterSpec getParameterByOID(java.lang.String oid)
           
 ECCParameterSpec removeECCParameterbyName(java.lang.String name)
          Removes a set of ECC parameters from the repository.
 ECCParameterSpec removeECCParameterbyOID(java.lang.String oid)
          Removes a set of ECC parameters with the provided OID from the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

deleteInstance

public static void deleteInstance()

getInstance

public static ECCParameterFactory getInstance()
Singleton method to get an instance of this class.


addECCParameter

public void addECCParameter(java.lang.String parameterName,
                            java.lang.String oid,
                            java.math.BigInteger p,
                            java.math.BigInteger k,
                            java.math.BigInteger r,
                            java.math.BigInteger s,
                            java.math.BigInteger c,
                            java.math.BigInteger a,
                            java.math.BigInteger b,
                            java.math.BigInteger gx,
                            java.math.BigInteger gy)
                     throws ECCException
Adds ECC parameters to the repository of the factory. The parameters are identified either by a name or by the oid or both.

Parameters:
parameterName - the name (alias) for this ecc parameter set. This parameter may be null if the oid parameter is specified.
oid - the unique object identifier of this parameter set. If null the name parameter must be specified.
p - the prime modulus p, defining the field.
k - the cofactor.
r - the order r.
s - the 160-bit input seed s to the SHA-1 based algorithm.
c - the output c of the SHA-1 based algorithm.
a - the coefficient a
b - the coefficient b (satisfying b^2 * c congruent -27 mod p);
gx - the base point x coordinate Gx
gy - the base point y coordinate Gy
Throws:
ECCException - if oid and the parameter name are null

addECCParameter

public void addECCParameter(java.lang.String parameterName,
                            java.lang.String oid,
                            int[] irreducible,
                            java.math.BigInteger k,
                            java.math.BigInteger r,
                            int[] a,
                            int[] b,
                            int[] gx,
                            int[] gy)
                     throws ECCException
Adds ECC parameters to the repository of the factory. The parameters are identified either by a name or by the oid or both.

Parameters:
parameterName - the name (alias) for this ecc parameter set. This parameter may be null if the oid parameter is specified.
oid - the unique object identifier of this parameter set. If null the name parameter must be specified.
irreducible - the irreducible polynom, defining the field.
k - the cofactor.
r - the order r.
a - the coefficient a
b - the coefficient b (satisfying b^2 * c congruent -27 mod p);
gx - the base point x coordinate Gx
gy - the base point y coordinate Gy
Throws:
ECCException - if oid and the parameter name are null

clearAll

public void clearAll()
Clears all ecc parameters.


getNames

public java.util.Enumeration getNames()
Returns:
all defined names of all parameters.

getParameterByName

public ECCParameterSpec getParameterByName(java.lang.String name)
Parameters:
name - the name (alias) of the ecc parameter
Returns:
the ecc parameters with the given name or null if no such parameter exists.

getParameterByOID

public ECCParameterSpec getParameterByOID(java.lang.String oid)
Parameters:
oid - the oid ecc parameter
Returns:
the ecc parameters with the given oid or null if no such parameter exists.

removeECCParameterbyName

public ECCParameterSpec removeECCParameterbyName(java.lang.String name)
Removes a set of ECC parameters from the repository. ONLY the name entry will be deleted the parameters will remain accessible by oid.

Parameters:
name - the name of the parameter set.
Returns:
the removed parameters or null if the parameters could not be found.

removeECCParameterbyOID

public ECCParameterSpec removeECCParameterbyOID(java.lang.String oid)
Removes a set of ECC parameters with the provided OID from the repository. ONLY the OID entry will be deleted. The parameters will remain accessible by their name.

Parameters:
oid - the object identifier for this parameter set.
Returns:
the removed parameters or null if the parameters could not be found.

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC