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

Org.BouncyCastle.Math.BinPoly.IBinPolyInv

interface IBinPolyInv
Multiplicative inversion in the field GF(2^n) = GF(2)[x] / f(x).
int N { get; }

Polynomial bit-length n.

int Size { get; }

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

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

Compute z = x^{-1} mod f(x). By convention 0 maps to 0 — there is no special case for it (nor for 1); both fall out of the computation, so the running cost is independent of the element value. x may alias z.