17 private bool homogeneous;
29 this.nonzero = P.nonzero;
30 this.homogeneous = P.homogeneous;
42 this.z = BigInteger.One;
43 this.t = BigInteger.Zero;
44 this.nonzero = !X.IsZero || !
Y.IsZero;
45 this.homogeneous =
false;
59 this.t = BigInteger.Zero;
60 this.nonzero = !X.IsZero || !
Y.IsZero;
61 this.homogeneous =
true;
77 this.nonzero = !X.IsZero || !
Y.IsZero;
78 this.homogeneous =
true;
87 internal set => this.x = value;
96 internal set => this.y = value;
108 this.homogeneous =
true;
121 this.homogeneous =
true;
131 internal set => this.nonzero = value;
139 get => this.homogeneous;
140 internal set => this.homogeneous = value;
156 StringBuilder sb =
new StringBuilder();
159 sb.Append(this.x.ToString());
161 sb.Append(this.y.ToString());
163 if (this.homogeneous)
166 sb.Append(this.z.ToString());
168 sb.Append(this.t.ToString());
173 return sb.ToString();
181 this.y.Equals(P.y) &&
182 this.z.Equals(P.z) &&
183 this.t.Equals(P.t) &&
184 this.nonzero.Equals(P.nonzero) &&
185 this.homogeneous.Equals(P.homogeneous);
192 this.x.GetHashCode() ^
193 this.y.GetHashCode() ^
194 this.z.GetHashCode() ^
195 this.t.GetHashCode() ^
196 this.nonzero.GetHashCode() ^
197 this.homogeneous.GetHashCode();
210 this.nonzero = C.nonzero;
211 this.homogeneous = C.homogeneous;
220 if (this.homogeneous)
224 this.z = BigInteger.One;
225 this.t = BigInteger.Zero;
226 this.homogeneous =
false;
230 this.x += Curve.
Prime;
233 this.y += Curve.
Prime;
BigInteger Divide(BigInteger a, BigInteger b)
Divides two numbers, modulus p
Base class of Elliptic curves over a prime field.
BigInteger Prime
Prime of curve.
ModulusP ModulusP
Arithmetic modulus p (the prime)
Represents a point on a curve.
override string ToString()
void Normalize(PrimeFieldCurve Curve)
Normalizes a point, if in homogeneous coorinates.
PointOnCurve(BigInteger X, BigInteger Y)
Represents a point on a curve.
PointOnCurve(PointOnCurve P)
Represents a point on a curve.
bool IsYZero
If the Y-coordinate is zero.
void CopyFrom(PointOnCurve C)
Copies the value from point C .
PointOnCurve(BigInteger X, BigInteger Y, BigInteger Z, BigInteger T)
Represents a point on a curve.
bool IsXZero
If the X-coordinate is zero.
override int GetHashCode()
PointOnCurve(BigInteger X, BigInteger Y, BigInteger Z)
Represents a point on a curve.
bool IsHomogeneous
If the point is in homogeneous coordinates.
override bool Equals(object obj)
bool NonZero
If the point is not zero (infinity).