Bouncy Castle Cryptography 1.50

org.bouncycastle.math.ec
Class ECCurve

java.lang.Object
  extended by org.bouncycastle.math.ec.ECCurve
Direct Known Subclasses:
ECCurve.F2m, ECCurve.Fp

public abstract class ECCurve
extends java.lang.Object

base class for an elliptic curve


Nested Class Summary
 class ECCurve.Config
           
static class ECCurve.F2m
          Elliptic curves over F2m.
static class ECCurve.Fp
          Elliptic curve over Fp
 
Field Summary
protected  ECFieldElement a
           
protected  ECFieldElement b
           
protected  int coord
           
static int COORD_AFFINE
           
static int COORD_HOMOGENEOUS
           
static int COORD_JACOBIAN
           
static int COORD_JACOBIAN_CHUDNOVSKY
           
static int COORD_JACOBIAN_MODIFIED
           
static int COORD_LAMBDA_AFFINE
           
static int COORD_LAMBDA_PROJECTIVE
           
static int COORD_SKEWED
           
protected  ECMultiplier multiplier
           
 
Constructor Summary
ECCurve()
           
 
Method Summary
protected  void checkPoint(ECPoint point)
           
protected  void checkPoints(ECPoint[] points)
           
protected abstract  ECCurve cloneCurve()
           
 ECCurve.Config configure()
           
protected  ECMultiplier createDefaultMultiplier()
           
 ECPoint createPoint(java.math.BigInteger x, java.math.BigInteger y)
           
 ECPoint createPoint(java.math.BigInteger x, java.math.BigInteger y, boolean withCompression)
          Deprecated. per-point compression property will be removed, use createPoint(BigInteger, BigInteger) and refer ECPoint.getEncoded(boolean)
protected abstract  ECPoint createRawPoint(ECFieldElement x, ECFieldElement y, boolean withCompression)
           
 ECPoint decodePoint(byte[] encoded)
          Decode a point on this curve from its ASN.1 encoding.
protected abstract  ECPoint decompressPoint(int yTilde, java.math.BigInteger X1)
           
abstract  ECFieldElement fromBigInteger(java.math.BigInteger x)
           
 ECFieldElement getA()
           
static int[] getAllCoordinateSystems()
           
 ECFieldElement getB()
           
 int getCoordinateSystem()
           
abstract  int getFieldSize()
           
abstract  ECPoint getInfinity()
           
 ECMultiplier getMultiplier()
          Sets the default ECMultiplier, unless already set.
 PreCompInfo getPreCompInfo(ECPoint p)
           
 ECPoint importPoint(ECPoint p)
           
 void normalizeAll(ECPoint[] points)
          Normalization ensures that any projective coordinate is 1, and therefore that the x, y coordinates reflect those of the equivalent point in an affine coordinate system.
 void setPreCompInfo(ECPoint point, PreCompInfo preCompInfo)
          Sets the PreCompInfo for a point on this curve.
 boolean supportsCoordinateSystem(int coord)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COORD_AFFINE

public static final int COORD_AFFINE
See Also:
Constant Field Values

COORD_HOMOGENEOUS

public static final int COORD_HOMOGENEOUS
See Also:
Constant Field Values

COORD_JACOBIAN

public static final int COORD_JACOBIAN
See Also:
Constant Field Values

COORD_JACOBIAN_CHUDNOVSKY

public static final int COORD_JACOBIAN_CHUDNOVSKY
See Also:
Constant Field Values

COORD_JACOBIAN_MODIFIED

public static final int COORD_JACOBIAN_MODIFIED
See Also:
Constant Field Values

COORD_LAMBDA_AFFINE

public static final int COORD_LAMBDA_AFFINE
See Also:
Constant Field Values

COORD_LAMBDA_PROJECTIVE

public static final int COORD_LAMBDA_PROJECTIVE
See Also:
Constant Field Values

COORD_SKEWED

public static final int COORD_SKEWED
See Also:
Constant Field Values

a

protected ECFieldElement a

b

protected ECFieldElement b

coord

protected int coord

multiplier

protected ECMultiplier multiplier
Constructor Detail

ECCurve

public ECCurve()
Method Detail

getAllCoordinateSystems

public static int[] getAllCoordinateSystems()

getFieldSize

public abstract int getFieldSize()

fromBigInteger

public abstract ECFieldElement fromBigInteger(java.math.BigInteger x)

configure

public ECCurve.Config configure()

createPoint

public ECPoint createPoint(java.math.BigInteger x,
                           java.math.BigInteger y)

createPoint

public ECPoint createPoint(java.math.BigInteger x,
                           java.math.BigInteger y,
                           boolean withCompression)
Deprecated. per-point compression property will be removed, use createPoint(BigInteger, BigInteger) and refer ECPoint.getEncoded(boolean)


cloneCurve

protected abstract ECCurve cloneCurve()

createRawPoint

protected abstract ECPoint createRawPoint(ECFieldElement x,
                                          ECFieldElement y,
                                          boolean withCompression)

createDefaultMultiplier

protected ECMultiplier createDefaultMultiplier()

supportsCoordinateSystem

public boolean supportsCoordinateSystem(int coord)

getPreCompInfo

public PreCompInfo getPreCompInfo(ECPoint p)

setPreCompInfo

public void setPreCompInfo(ECPoint point,
                           PreCompInfo preCompInfo)
Sets the PreCompInfo for a point on this curve. Used by ECMultipliers to save the precomputation for this ECPoint for use by subsequent multiplication.

Parameters:
point - The ECPoint to store precomputations for.
preCompInfo - The values precomputed by the ECMultiplier.

importPoint

public ECPoint importPoint(ECPoint p)

normalizeAll

public void normalizeAll(ECPoint[] points)
Normalization ensures that any projective coordinate is 1, and therefore that the x, y coordinates reflect those of the equivalent point in an affine coordinate system. Where more than one point is to be normalized, this method will generally be more efficient than normalizing each point separately.

Parameters:
points - An array of points that will be updated in place with their normalized versions, where necessary

getInfinity

public abstract ECPoint getInfinity()

getA

public ECFieldElement getA()

getB

public ECFieldElement getB()

getCoordinateSystem

public int getCoordinateSystem()

decompressPoint

protected abstract ECPoint decompressPoint(int yTilde,
                                           java.math.BigInteger X1)

getMultiplier

public ECMultiplier getMultiplier()
Sets the default ECMultiplier, unless already set.


decodePoint

public ECPoint decodePoint(byte[] encoded)
Decode a point on this curve from its ASN.1 encoding. The different encodings are taken account of, including point compression for Fp (X9.62 s 4.2.1 pg 17).

Returns:
The decoded point.

checkPoint

protected void checkPoint(ECPoint point)

checkPoints

protected void checkPoints(ECPoint[] points)

Bouncy Castle Cryptography 1.50