public static void reduce(int[] xx, int[] z) { long cc = Nat192.mul33Add(PInv33, xx, 6, xx, 0, z, 0); int c = Nat192.mul33DWordAdd(PInv33, cc, z, 0); // assert c == 0L || c == 1L; if (c != 0 || (z[5] == P5 && Nat192.gte(z, P))) { Nat.add33To(6, PInv33, z); } }
public static void reduce(int[] xx, int[] z) { long cc = Nat224.mul33Add(PInv33, xx, 7, xx, 0, z, 0); int c = Nat224.mul33DWordAdd(PInv33, cc, z, 0); // assert c == 0L || c == 1L; if (c != 0 || (z[6] == P6 && Nat224.gte(z, P))) { Nat.add33To(7, PInv33, z); } }
public static void reduce32(int x, int[] z) { if ((x != 0 && Nat224.mul33WordAdd(PInv33, x, z, 0) != 0) || (z[6] == P6 && Nat224.gte(z, P))) { Nat.add33To(7, PInv33, z); } }
public static void reduce32(int x, int[] z) { if ((x != 0 && Nat192.mul33WordAdd(PInv33, x, z, 0) != 0) || (z[5] == P5 && Nat192.gte(z, P))) { Nat.add33To(6, PInv33, z); } }
public static void reduce32(int x, int[] z) { if ((x != 0 && Nat256.mul33WordAdd(PInv33, x, z, 0) != 0) || (z[7] == P7 && Nat256.gte(z, P))) { Nat.add33To(8, PInv33, z); } }
public static int[] fromBigInteger(BigInteger x) { int[] z = Nat224.fromBigInteger(x); if (z[6] == P6 && Nat224.gte(z, P)) { Nat.add33To(7, PInv33, z); } return z; }
public static void reduce32(int x, int[] z) { if ((x != 0 && Nat160.mul33WordAdd(PInv33, x, z, 0) != 0) || (z[4] == P4 && Nat160.gte(z, P))) { Nat.add33To(5, PInv33, z); } }
public static void half(int[] x, int[] z) { if ((x[0] & 1) == 0) { Nat.shiftDownBit(8, x, 0, z); } else { int c = Nat256.add(x, P, z); Nat.shiftDownBit(8, z, c); } }
public static void half(int[] x, int[] z) { if ((x[0] & 1) == 0) { Nat.shiftDownBit(6, x, 0, z); } else { int c = Nat192.add(x, P, z); Nat.shiftDownBit(6, z, c); } }
public static void half(int[] x, int[] z) { if ((x[0] & 1) == 0) { Nat.shiftDownBit(5, x, 0, z); } else { int c = Nat160.add(x, P, z); Nat.shiftDownBit(5, z, c); } }
public static void subtract(int[] x, int[] y, int[] z) { int c = Nat160.sub(x, y, z); if (c != 0) { Nat.subWordFrom(5, PInv, z); } }
public static void half(int[] x, int[] z) { if ((x[0] & 1) == 0) { Nat.shiftDownBit(8, x, 0, z); } else { int c = Nat256.add(x, P, z); Nat.shiftDownBit(8, z, c); } }