public static void HalfTrace(ulong[] x, ulong[] z) { ulong[] tt = Nat128.CreateExt64(); Nat128.Copy64(x, z); for (int i = 1; i < 113; i += 2) { ImplSquare(z, tt); Reduce(tt, z); ImplSquare(z, tt); Reduce(tt, z); AddTo(x, z); } }
public override ECLookupTable CreateCacheSafeLookupTable(ECPoint[] points, int off, int len) { ulong[] table = new ulong[len * SECT113R2_FE_LONGS * 2]; { int pos = 0; for (int i = 0; i < len; ++i) { ECPoint p = points[off + i]; Nat128.Copy64(((SecT113FieldElement)p.RawXCoord).x, 0, table, pos); pos += SECT113R2_FE_LONGS; Nat128.Copy64(((SecT113FieldElement)p.RawYCoord).x, 0, table, pos); pos += SECT113R2_FE_LONGS; } } return(new SecT113R2LookupTable(this, table, len)); }