Esempio n. 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);
        }
Esempio n. 2
0
 public FpParameter(FpCurve curve, EcPoint g, BigInteger n)
 {
     Curve     = curve;
     G         = g;
     N         = n;
     BitLength = (ushort)n.BitLength();
 }
Esempio n. 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));
        }