public static void Twice(uint[] x, uint[] z) { if (Nat.ShiftUpBit(8, x, 0u, z) != 0u || (z[7] == 4294967295u && Nat256.Gte(z, SecP256R1Field.P))) { SecP256R1Field.AddPInvTo(z); } }
public static void AddOne(uint[] x, uint[] z) { if (Nat.Inc(8, x, z) != 0u || (z[7] == 4294967295u && Nat256.Gte(z, SecP256R1Field.P))) { SecP256R1Field.AddPInvTo(z); } }
public static void Reduce32(uint x, uint[] z) { long num = 0L; if (x != 0u) { long num2 = (long)((ulong)x); num += (long)((ulong)z[0] + (ulong)num2); z[0] = (uint)num; num >>= 32; if (num != 0L) { num += (long)((ulong)z[1]); z[1] = (uint)num; num >>= 32; num += (long)((ulong)z[2]); z[2] = (uint)num; num >>= 32; } num += (long)((ulong)z[3] - (ulong)num2); z[3] = (uint)num; num >>= 32; if (num != 0L) { num += (long)((ulong)z[4]); z[4] = (uint)num; num >>= 32; num += (long)((ulong)z[5]); z[5] = (uint)num; num >>= 32; } num += (long)((ulong)z[6] - (ulong)num2); z[6] = (uint)num; num >>= 32; num += (long)((ulong)z[7] + (ulong)num2); z[7] = (uint)num; num >>= 32; } if (num != 0L || (z[7] == 4294967295u && Nat256.Gte(z, SecP256R1Field.P))) { SecP256R1Field.AddPInvTo(z); } }