BigInt.redc

private void redc(ulong[] T, const(ulong)[] mod, ulong modPrime, ulong[] res) pure nothrow @nogc @trusted

Montgomery Reduction: res = T * R^-1 mod N.

T is modified in place (scratch).

Parameters

TInput value (size 2*N + 1), modified in place
modModulus N (size n)
modPrime-N^-1 mod 2^64
resOutput buffer (size n)