<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.0" />

Reduce

class Reduce
namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium { internal class Reduce { public static int MontgomeryReduce(long a) { int num = (int)(a * 58728449); return (int)(a - (long)num * 8380417 >> 32); } public static int Reduce32(int a) { int num = a + 4194304 >> 23; return a - num * 8380417; } public static int ConditionalAddQ(int a) { return a + ((a >> 31) & 8380417); } } }