Пример #1
0
        public bool ValidatePoint(EcPoint p)
        {
            var lhs = p.Y * p.Y;
            var rhs = p.X * p.X * p.X % P + A * p.X + B;

            return(lhs % P == rhs % P);
        }
Пример #2
0
 public FpParameter(FpCurve curve, EcPoint g, BigInteger n)
 {
     Curve     = curve;
     G         = g;
     N         = n;
     BitLength = (ushort)n.BitLength();
 }
Пример #3
0
        public bool Equals(EcPoint other)
        {
            if (Inf && other.Inf)
            {
                return(true);
            }

            if (Inf || other.Inf)
            {
                return(false);
            }

            return(X.Equals(other.X) && Y.Equals(other.Y));
        }