示例#1
0
 internal bool Equals(ECCurvePrime curve)
 {
     if (this == curve)
     {
         return(true);
     }
     return(BigInt.Compare(mod, curve.mod) == 0 &&
            BigInt.Compare(a, curve.a) == 0 &&
            BigInt.Compare(b, curve.b) == 0 &&
            BigInt.Compare(gx, curve.gx) == 0 &&
            BigInt.Compare(gy, curve.gy) == 0);
 }
示例#2
0
 /*
  * Create a new instance. It is initialized to the point at
  * infinity.
  */
 internal MutableECPointPrime(ECCurvePrime curve)
 {
     this.curve = curve;
     mx         = curve.mp.Dup();
     my         = curve.mp.Dup();
     mz         = curve.mp.Dup();
     mt1        = curve.mp.Dup();
     mt2        = curve.mp.Dup();
     mt3        = curve.mp.Dup();
     mt4        = curve.mp.Dup();
     mt5        = curve.mp.Dup();
     ms1        = curve.mp.Dup();
     ms2        = curve.mp.Dup();
     ms3        = curve.mp.Dup();
     ms4        = curve.mp.Dup();
     ms5        = curve.mp.Dup();
     ms6        = curve.mp.Dup();
     affine     = 0xFFFFFFFF;
 }