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

Org.BouncyCastle.Math.BinPoly.IBinPolyMul

interface IBinPolyMul
Binary polynomial arithmetic in GF(2)[x] / r(x), where r(x) is a binomial, trinomial, or pentanomial.
int N { get; }

Polynomial bit-length n.

int Size { get; }

Number of ulong limbs required to hold a polynomial of length N.

void Multiply(ulong[] x, int xOff, ulong[] y, int yOff, ulong[] z, int zOff)

Compute z = x * y mod r(x). x may alias z; y must not alias z. See the interface remarks for the full aliasing contract.

void Square(ulong[] x, int xOff, ulong[] z, int zOff)

Compute z = x^2 mod r(x). x may alias z (in-place squaring).

void SquareN(ulong[] x, int xOff, int n, ulong[] z, int zOff)

Compute z = x^(2^n) mod r(x), i.e. n repeated squarings. x may alias z (in-place repeated squaring).