public static long[] fromBigInteger(BigInteger x) { long[] z = Nat576.fromBigInteger64(x); reduce5(z, 0); return z; }
public static long[] precompMultiplicand(long[] x) { /* * Precompute table of all 4-bit products of x (first section) */ int len = 9 << 4; long[] t = new long[len << 1]; System.arraycopy(x, 0, t, 9, 9); // reduce5(T0, 9); int tOff = 0; for (int i = 7; i > 0; --i) { tOff += 18; Nat.shiftUpBit64(9, t, tOff >>> 1, 0L, t, tOff); reduce5(t, tOff); add(t, 9, t, tOff, t, tOff + 9); } /* * Second section with all 4-bit products of B shifted 4 bits */ Nat.shiftUpBits64(len, t, 0, 4, 0L, t, len); return t; }