Esempio n. 1
0
        public FpCurve(BigInteger q, BigInteger a, BigInteger b, BigInteger order, BigInteger cofactor)
            : base(q)
        {
            this.m_q        = q;
            this.m_r        = FpFieldElement.CalculateResidue(q);
            this.m_infinity = new FpPoint(this, null, null);

            this.m_a        = FromBigInteger(a);
            this.m_b        = FromBigInteger(b);
            this.m_order    = order;
            this.m_cofactor = cofactor;
            this.m_coord    = FP_DEFAULT_COORDS;
        }
Esempio n. 2
0
        public override bool Equals(
            object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            FpFieldElement other = obj as FpFieldElement;

            if (other == null)
            {
                return(false);
            }

            return(Equals(other));
        }
Esempio n. 3
0
 public virtual bool Equals(
     FpFieldElement other)
 {
     return(q.Equals(other.q) && base.Equals(other));
 }