示例#1
0
 public override ECFieldElement Sqrt()
 {
     if (!x.IsZero() && !x.IsOne())
     {
         return(SquarePow(m - 1));
     }
     return(this);
 }
示例#2
0
        public override ECFieldElement Sqrt()
        {
            LongArray x1 = this.x;

            if (x1.IsOne() || x1.IsZero())
            {
                return(this);
            }

            LongArray x2 = x1.ModSquareN(m - 1, m, ks);

            return(new F2mFieldElement(m, ks, x2));
        }
示例#3
0
 public override ECFieldElement Sqrt()
 {
     return((x.IsZero() || x.IsOne()) ? this : SquarePow(m - 1));
 }