de.flexiprovider.ec.parameters
Class CurveParams

java.lang.Object
  |
  +--de.flexiprovider.ec.parameters.CurveParams
All Implemented Interfaces:
AlgorithmParameterSpec, java.security.spec.AlgorithmParameterSpec
Direct Known Subclasses:
CurveParams.CurveParamsGF2n, CurveParams.CurveParamsGFP

public abstract class CurveParams
extends java.lang.Object
implements AlgorithmParameterSpec

This class implements EC Domain Parameters as specified in the standard IEEE P1363-D8.

Author:
Birgit Henhapl, Martin Döring

Inner Class Summary
static class CurveParams.CurveParamsGF2n
          Inner class for representing char 2 curve parameters.
static class CurveParams.CurveParamsGF2nONB
          Inner class for representing char 2 curve parameters.
static class CurveParams.CurveParamsGF2nPentanomial
          Inner class for representing char 2 pentanomial curve parameters.
static class CurveParams.CurveParamsGF2nTrinomial
          Inner class for representing char 2 trinomial curve parameters.
static class CurveParams.CurveParamsGFP
          Inner class for representing prime curve parameters.
 
Field Summary
(package private)  EllipticCurve E
          elliptic curve E
(package private)  Point g
          basepoint G
(package private)  FlexiBigInt q
          size of the underlying field (either a prime or a power of two)
 
Constructor Summary
protected CurveParams(Point g, FlexiBigInt r, int k)
          Construct new curve parameters from the given parameters.
protected CurveParams(java.lang.String r, java.lang.String k)
          Construct new curve parameters from the given Strings.
protected CurveParams(java.lang.String oid, java.lang.String r, java.lang.String k)
          Construct new curve parameters from the given Strings.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compare these parameters with another object.
 EllipticCurve getE()
           
 Point getG()
           
 int getK()
           
 codec.asn1.ASN1ObjectIdentifier getOID()
           
 FlexiBigInt getQ()
           
 FlexiBigInt getR()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

q

FlexiBigInt q
size of the underlying field (either a prime or a power of two)

E

EllipticCurve E
elliptic curve E

g

Point g
basepoint G
Constructor Detail

CurveParams

protected CurveParams(java.lang.String r,
                      java.lang.String k)
Construct new curve parameters from the given Strings.
Parameters:
r - order r of basepoint G
k - cofactor k

CurveParams

protected CurveParams(java.lang.String oid,
                      java.lang.String r,
                      java.lang.String k)
Construct new curve parameters from the given Strings.
Parameters:
oid - OID of the curve parameters
r - order r of basepoint G
k - cofactor k

CurveParams

protected CurveParams(Point g,
                      FlexiBigInt r,
                      int k)
Construct new curve parameters from the given parameters.
Parameters:
g - basepoint G
r - order r of basepoint G
k - cofactor k
Method Detail

getOID

public codec.asn1.ASN1ObjectIdentifier getOID()
Returns:
the OID of the curve parameters

getQ

public FlexiBigInt getQ()
Returns:
the size of the underlying field

getE

public EllipticCurve getE()
Returns:
the elliptic curve E

getG

public Point getG()
Returns:
a copy of the basepoint G

getR

public FlexiBigInt getR()
Returns:
the order r of basepoint G

getK

public int getK()
Returns:
the cofactor k

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of these curve parameters

equals

public boolean equals(java.lang.Object other)
Compare these parameters with another object.
Overrides:
equals in class java.lang.Object
Parameters:
other - the other object
Returns:
the result of the comparison