Example #1
0
 public override ECFieldElement SquarePlusProduct(ECFieldElement x, ECFieldElement y)
 {
     ulong[] array  = this.x;
     ulong[] array2 = ((SecT233FieldElement)x).x;
     ulong[] y2     = ((SecT233FieldElement)y).x;
     ulong[] array3 = Nat256.CreateExt64();
     SecT233Field.SquareAddToExt(array, array3);
     SecT233Field.MultiplyAddToExt(array2, y2, array3);
     ulong[] z = Nat256.Create64();
     SecT233Field.Reduce(array3, z);
     return(new SecT233FieldElement(z));
 }
Example #2
0
        public override ECFieldElement SquarePlusProduct(ECFieldElement x, ECFieldElement y)
        {
            ulong[] ax = this.x;
            ulong[] xx = ((SecT233FieldElement)x).x, yx = ((SecT233FieldElement)y).x;

            ulong[] tt = Nat256.CreateExt64();
            SecT233Field.SquareAddToExt(ax, tt);
            SecT233Field.MultiplyAddToExt(xx, yx, tt);

            ulong[] z = Nat256.Create64();
            SecT233Field.Reduce(tt, z);
            return(new SecT233FieldElement(z));
        }