Exemple #1
0
        public override ECFieldElement SquarePow(int pow)
        {
            if (pow < 1)
            {
                return(this);
            }

            ulong[] z = Nat320.Create64();
            SecT283Field.SquareN(x, pow, z);
            return(new SecT283FieldElement(z));
        }
Exemple #2
0
        public override ECFieldElement MultiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y)
        {
            ulong[] ax = this.x, bx = ((SecT283FieldElement)b).x;
            ulong[] xx = ((SecT283FieldElement)x).x, yx = ((SecT283FieldElement)y).x;

            ulong[] tt = Nat.Create64(9);
            SecT283Field.MultiplyAddToExt(ax, bx, tt);
            SecT283Field.MultiplyAddToExt(xx, yx, tt);

            ulong[] z = Nat320.Create64();
            SecT283Field.Reduce(tt, z);
            return(new SecT283FieldElement(z));
        }
Exemple #3
0
 public override ECFieldElement Multiply(ECFieldElement b)
 {
     ulong[] z = Nat320.Create64();
     SecT283Field.Multiply(x, ((SecT283FieldElement)b).x, z);
     return(new SecT283FieldElement(z));
 }
Exemple #4
0
 public override ECFieldElement AddOne()
 {
     ulong[] z = Nat320.Create64();
     SecT283Field.AddOne(x, z);
     return(new SecT283FieldElement(z));
 }