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

BigIntegers

public static class BigIntegers
public static readonly BigInteger One

public static readonly BigInteger Zero

public static byte[] AsUnsignedByteArray(BigInteger n)

public static byte[] AsUnsignedByteArray(int length, BigInteger n)

public static void AsUnsignedByteArray(BigInteger n, byte[] buf, int off, int len)

public static BigInteger CreateRandomBigInteger(int bitLength, SecureRandom secureRandom)

Creates a Random BigInteger from the secure random of a given bit length.

public static BigInteger FromUnsignedByteArray(byte[] buf)

public static BigInteger FromUnsignedByteArray(byte[] buf, int off, int length)

public static int GetByteLength(BigInteger n)

public static int GetUnsignedByteLength(BigInteger n)

public static bool ModOddIsCoprime(BigInteger M, BigInteger X)

public static bool ModOddIsCoprimeVar(BigInteger M, BigInteger X)