13 protected BigInteger
d;
18 protected BigInteger
d2;
48 this.d2 = BigInteger.Remainder(
d << 1, this.
p);
66 return new PointOnCurve(BigInteger.Zero, BigInteger.One);
73 public BigInteger
D => this.
d;
82 public abstract BigInteger
GetX(BigInteger Y,
bool X0);
Implements the Edwards curve Digital Signature Algorithm (EdDSA), as defined in RFC 8032....
static PointOnCurve Decode(byte[] Encoded, bool BigEndian, EdwardsCurveBase Curve)
Decodes a point on the curve in accordance with §5.1.3 of RFC 8032.
static byte[] Encode(PointOnCurve P, bool BigEndian, EdwardsCurveBase Curve)
Encodes a point on the curve in accordance with §5.1.2 of RFC 8032.
Base class of different types of Edwards curves over a prime field.
void Negate(ref PointOnCurve P)
Negates a point on the curve.
EdwardsCurveBase(BigInteger Prime, PointOnCurve BasePoint, BigInteger d, BigInteger Order, int Cofactor)
Base class of different types of Edwards curves over a prime field.
abstract BigInteger GetX(BigInteger Y, bool X0)
Gets the X-coordinate that corresponds to a given Y-coordainte, and the first bit of the X-coordinate...
override PointOnCurve Decode(byte[] Point, bool BigEndian)
Decodes an encoded point on the curve.
override byte[] Encode(PointOnCurve Point, bool BigEndian)
Encodes a point on the curve.
EdwardsCurveBase(BigInteger Prime, PointOnCurve BasePoint, BigInteger d, BigInteger Order, int Cofactor, byte[] Secret)
Base class of different types of Edwards curves over a prime field.
BigInteger D
d coefficient of Edwards curve.
BigInteger d
Edwards curve coefficient
BigInteger d2
Edwards curve coefficient * 2 mod p
abstract int CoordinateBits
Number of bits used to encode the y-coordinate.
override PointOnCurve Zero
Neutral point.
BigInteger Order
Order of curve.
int Cofactor
Cofactor of curve.
PointOnCurve BasePoint
Base-point of curve.
Base class of Elliptic curves over a prime field.
BigInteger Prime
Prime of curve.
readonly BigInteger p
Prime p
Represents a point on a curve.