CurveGFp

This class represents an elliptic curve over GF(p)

Constructors

this
this(BigInt p, BigInt a, BigInt b)

Construct the elliptic curve E: y^2 = x^3 + ax + b over GF(p)

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

fromRep
void fromRep(BigInt x, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
fromRep
BigInt fromRep(BigInt x, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
getA
const(BigInt) getA()
getARep
const(BigInt) getARep()
getB
const(BigInt) getB()
getBRep
const(BigInt) getBRep()
getP
const(BigInt) getP()

Get prime modulus of the field of the curve

mul
void mul(BigInt z, BigInt x, BigInt y, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
mul
BigInt mul(BigInt x, BigInt y, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
normalize
void normalize(BigInt x, SecureVector!word* ws, size_t bound)

Adjust x to be in [0,p) @param bound if greater than zero, assume that no more than bound additions or subtractions are required to move x into range.

opCmp
int opCmp(CurveGFp rhs)

Equality operator

opEquals
bool opEquals(CurveGFp other)

Equality operator

sqr
void sqr(BigInt z, BigInt x, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
sqr
BigInt sqr(BigInt x, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
swap
void swap(CurveGFp other)

swaps the states of this and other, does not throw

toRep
void toRep(BigInt x, SecureVector!word* ws)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
toVector
Vector!char toVector()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

dup
CurveGFp dup [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

chooseRepr
CurveGFpRepr chooseRepr(BigInt p, BigInt a, BigInt b)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

m_repr
Unique!CurveGFpRepr m_repr;
Undocumented in source.

Meta