public static void HalfTrace(ulong[] x, ulong[] z) { ulong[] tt = Nat256.CreateExt64(); Nat256.Copy64(x, z); for (int i = 1; i < 239; 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 * SECT239K1_FE_LONGS * 2]; { int pos = 0; for (int i = 0; i < len; ++i) { ECPoint p = points[off + i]; Nat256.Copy64(((SecT239FieldElement)p.RawXCoord).x, 0, table, pos); pos += SECT239K1_FE_LONGS; Nat256.Copy64(((SecT239FieldElement)p.RawYCoord).x, 0, table, pos); pos += SECT239K1_FE_LONGS; } } return(new SecT239K1LookupTable(this, table, len)); }