<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0-beta.98" />

Reduce

static class Reduce
namespace Org.BouncyCastle.Crypto.Kems.MLKem { internal static class Reduce { internal static short MontgomeryReduce(int a) { int num = (short)(a * 62209) * 3329; num = a - num; num >>= 16; return (short)num; } internal static short BarrettReduce(short a) { short num = (short)(20159 * a >> 26); num = (short)(num * 3329); return (short)(a - num); } internal static short CondSubQ(short a) { a = (short)(a - 3329); a = (short)(a + (short)((a >> 15) & 3329)); return a; } } }