public override ECFieldElement SquarePlusProduct(ECFieldElement x, ECFieldElement y) { ulong[] array = this.x; ulong[] array2 = ((SecT163FieldElement)x).x; ulong[] y2 = ((SecT163FieldElement)y).x; ulong[] array3 = Nat192.CreateExt64(); SecT163Field.SquareAddToExt(array, array3); SecT163Field.MultiplyAddToExt(array2, y2, array3); ulong[] z = Nat192.Create64(); SecT163Field.Reduce(array3, z); return(new SecT163FieldElement(z)); }
public override ECFieldElement MultiplyPlusProduct(ECFieldElement b, ECFieldElement x, ECFieldElement y) { ulong[] ax = this.x, bx = ((SecT163FieldElement)b).x; ulong[] xx = ((SecT163FieldElement)x).x, yx = ((SecT163FieldElement)y).x; ulong[] tt = Nat192.CreateExt64(); SecT163Field.MultiplyAddToExt(ax, bx, tt); SecT163Field.MultiplyAddToExt(xx, yx, tt); ulong[] z = Nat192.Create64(); SecT163Field.Reduce(tt, z); return new SecT163FieldElement(z); }
public static void SquareN(ulong[] x, int n, ulong[] z) { Debug.Assert(n > 0); ulong[] tt = Nat192.CreateExt64(); ImplSquare(x, tt); Reduce(tt, z); while (--n > 0) { ImplSquare(z, tt); Reduce(tt, z); } }
public static void HalfTrace(ulong[] x, ulong[] z) { ulong[] tt = Nat192.CreateExt64(); Nat192.Copy64(x, z); for (int i = 1; i < 163; i += 2) { ImplSquare(z, tt); Reduce(tt, z); ImplSquare(z, tt); Reduce(tt, z); AddTo(x, z); } }
public static void MultiplyAddToExt(ulong[] x, ulong[] y, ulong[] zz) { ulong[] tt = Nat192.CreateExt64(); ImplMultiply(x, y, tt); AddExt(zz, tt, zz); }
public static void Multiply(ulong[] x, ulong[] y, ulong[] z) { ulong[] tt = Nat192.CreateExt64(); ImplMultiply(x, y, tt); Reduce(tt, z); }
public static void SquareAddToExt(ulong[] x, ulong[] zz) { ulong[] tt = Nat192.CreateExt64(); ImplSquare(x, tt); AddExt(zz, tt, zz); }
public static void Square(ulong[] x, ulong[] z) { ulong[] tt = Nat192.CreateExt64(); ImplSquare(x, tt); Reduce(tt, z); }