This class represents an elliptic curve over GF(p)
this()(auto ref const BigInt p, auto ref const BigInt a, auto ref const BigInt b);
Construct the elliptic curve E: y^2 = x^3 + ax + b over GF(p)
- Parameters
BigInt p |
prime number of the field |
BigInt a |
first coefficient |
BigInt b |
second coefficient |
const ref const(BigInt) getA();
- Returns
- curve coefficient a
const ref const(BigInt) getB();
- Returns
- curve coefficient b
const ref const(BigInt) getP();
Get prime modulus of the field of the curve
- Returns
- prime modulus of the field of the curve
const ref const(BigInt) getR2();
- Returns
- Montgomery parameter r^2 % p
const ref const(BigInt) getAR();
const ref const(BigInt) getBR();
- Returns
- Montgomery parameter p-dash
void swap()(auto ref CurveGFp other);
swaps the states of this and other, does not throw
- Parameters
CurveGFp other |
curve to swap values with |
const bool opEquals(ref const CurveGFp other);
Equality operator
- Parameters
CurveGFp other |
curve to compare with |
- Returns
- true iff this is the same curve as other
const int opCmp(ref CurveGFp rhs);
Equality operator
- Parameters
- Returns
- true iff lhs is not the same as rhs