Table of Contents

Class ECCurve

Namespace
Org.BouncyCastle.Math.EC
Assembly
BouncyCastle.Cryptography.dll
public abstract class ECCurve
Inheritance
ECCurve
Derived
Inherited Members

Remarks

Base class for an elliptic curve.

Constructors

ECCurve(IFiniteField)

protected ECCurve(IFiniteField field)

Parameters

field IFiniteField

Fields

COORD_AFFINE

public const int COORD_AFFINE = 0

Field Value

int

COORD_HOMOGENEOUS

public const int COORD_HOMOGENEOUS = 1

Field Value

int

COORD_JACOBIAN

public const int COORD_JACOBIAN = 2

Field Value

int

COORD_JACOBIAN_CHUDNOVSKY

public const int COORD_JACOBIAN_CHUDNOVSKY = 3

Field Value

int

COORD_JACOBIAN_MODIFIED

public const int COORD_JACOBIAN_MODIFIED = 4

Field Value

int

COORD_LAMBDA_AFFINE

public const int COORD_LAMBDA_AFFINE = 5

Field Value

int

COORD_LAMBDA_PROJECTIVE

public const int COORD_LAMBDA_PROJECTIVE = 6

Field Value

int

COORD_SKEWED

public const int COORD_SKEWED = 7

Field Value

int

m_a

protected ECFieldElement m_a

Field Value

ECFieldElement

m_b

protected ECFieldElement m_b

Field Value

ECFieldElement

m_cofactor

protected BigInteger m_cofactor

Field Value

BigInteger

m_coord

protected int m_coord

Field Value

int

m_endomorphism

protected ECEndomorphism m_endomorphism

Field Value

ECEndomorphism

m_field

protected readonly IFiniteField m_field

Field Value

IFiniteField

m_multiplier

protected ECMultiplier m_multiplier

Field Value

ECMultiplier

m_order

protected BigInteger m_order

Field Value

BigInteger

Properties

A

public virtual ECFieldElement A { get; }

Property Value

ECFieldElement

B

public virtual ECFieldElement B { get; }

Property Value

ECFieldElement

Cofactor

public virtual BigInteger Cofactor { get; }

Property Value

BigInteger

CoordinateSystem

public virtual int CoordinateSystem { get; }

Property Value

int

Field

public virtual IFiniteField Field { get; }

Property Value

IFiniteField

FieldElementEncodingLength

public virtual int FieldElementEncodingLength { get; }

Property Value

int

FieldSize

public abstract int FieldSize { get; }

Property Value

int

Infinity

public abstract ECPoint Infinity { get; }

Property Value

ECPoint

Order

public virtual BigInteger Order { get; }

Property Value

BigInteger

Methods

CheckPoint(ECPoint)

protected virtual void CheckPoint(ECPoint point)

Parameters

point ECPoint

CheckPoints(ECPoint[])

protected virtual void CheckPoints(ECPoint[] points)

Parameters

points ECPoint[]

CheckPoints(ECPoint[], int, int)

protected virtual void CheckPoints(ECPoint[] points, int off, int len)

Parameters

points ECPoint[]
off int
len int

CloneCurve()

protected abstract ECCurve CloneCurve()

Returns

ECCurve

Configure()

public virtual ECCurve.Config Configure()

Returns

ECCurve.Config

CreateCacheSafeLookupTable(ECPoint[], int, int)

public virtual ECLookupTable CreateCacheSafeLookupTable(ECPoint[] points, int off, int len)

Parameters

points ECPoint[]
off int
len int

Returns

ECLookupTable

CreateDefaultMultiplier()

protected virtual ECMultiplier CreateDefaultMultiplier()

Returns

ECMultiplier

CreatePoint(BigInteger, BigInteger)

public virtual ECPoint CreatePoint(BigInteger x, BigInteger y)

Parameters

x BigInteger
y BigInteger

Returns

ECPoint

CreateRawPoint(ECFieldElement, ECFieldElement)

protected abstract ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y)

Parameters

x ECFieldElement
y ECFieldElement

Returns

ECPoint

CreateRawPoint(ECFieldElement, ECFieldElement, ECFieldElement[])

protected abstract ECPoint CreateRawPoint(ECFieldElement x, ECFieldElement y, ECFieldElement[] zs)

Parameters

x ECFieldElement
y ECFieldElement
zs ECFieldElement[]

Returns

ECPoint

DecodePoint(byte[])

public virtual ECPoint DecodePoint(byte[] encoded)

Parameters

encoded byte[]

Returns

ECPoint

DecodePoint(ReadOnlySpan<byte>)

public virtual ECPoint DecodePoint(ReadOnlySpan<byte> encoded)

Parameters

encoded ReadOnlySpan<byte>

Returns

ECPoint

DecompressPoint(int, BigInteger)

protected abstract ECPoint DecompressPoint(int yTilde, BigInteger X1)

Parameters

yTilde int
X1 BigInteger

Returns

ECPoint

Equals(ECCurve)

public virtual bool Equals(ECCurve other)

Parameters

other ECCurve

Returns

bool

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

FromBigInteger(BigInteger)

public abstract ECFieldElement FromBigInteger(BigInteger x)

Parameters

x BigInteger

Returns

ECFieldElement

GetAffinePointEncodingLength(bool)

public virtual int GetAffinePointEncodingLength(bool compressed)

Parameters

compressed bool

Returns

int

GetAllCoordinateSystems()

public static int[] GetAllCoordinateSystems()

Returns

int[]

GetEndomorphism()

public virtual ECEndomorphism GetEndomorphism()

Returns

ECEndomorphism

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetMultiplier()

public virtual ECMultiplier GetMultiplier()

Returns

ECMultiplier

GetPreCompInfo(ECPoint, string)

public virtual PreCompInfo GetPreCompInfo(ECPoint point, string name)

Parameters

point ECPoint
name string

Returns

PreCompInfo

ImportPoint(ECPoint)

public virtual ECPoint ImportPoint(ECPoint p)

Parameters

p ECPoint

Returns

ECPoint

IsValidFieldElement(BigInteger)

public abstract bool IsValidFieldElement(BigInteger x)

Parameters

x BigInteger

Returns

bool

NormalizeAll(ECPoint[])

public virtual void NormalizeAll(ECPoint[] points)

Parameters

points ECPoint[]

NormalizeAll(ECPoint[], int, int, ECFieldElement)

public virtual void NormalizeAll(ECPoint[] points, int off, int len, ECFieldElement iso)

Parameters

points ECPoint[]
off int
len int
iso ECFieldElement

Precompute(ECPoint, string, IPreCompCallback)

public virtual PreCompInfo Precompute(ECPoint point, string name, IPreCompCallback callback)

Parameters

point ECPoint
name string
callback IPreCompCallback

Returns

PreCompInfo

RandomFieldElement(SecureRandom)

public abstract ECFieldElement RandomFieldElement(SecureRandom r)

Parameters

r SecureRandom

Returns

ECFieldElement

RandomFieldElementMult(SecureRandom)

public abstract ECFieldElement RandomFieldElementMult(SecureRandom r)

Parameters

r SecureRandom

Returns

ECFieldElement

SupportsCoordinateSystem(int)

public virtual bool SupportsCoordinateSystem(int coord)

Parameters

coord int

Returns

bool

ValidatePoint(BigInteger, BigInteger)

public virtual ECPoint ValidatePoint(BigInteger x, BigInteger y)

Parameters

x BigInteger
y BigInteger

Returns

ECPoint