<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Math.BinPoly.BinomialPermuteMul

IBinPolyMul for x^n + 1 with odd n: SquareN becomes a coefficient permutation at and above a crossover count, and every other operation forwards to the wrapped instance.
namespace Org.BouncyCastle.Math.BinPoly { internal sealed class BinomialPermuteMul : IBinPolyMul { public int N { get; } public int Size { get; } public void Multiply(ulong[] x, int xOff, ulong[] y, int yOff, ulong[] z, int zOff); public void Square(ulong[] x, int xOff, ulong[] z, int zOff); public void SquareN(ulong[] x, int xOff, int n, ulong[] z, int zOff); } }