PrimesIsMRProbablePrimeToBase Method

FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base).

Definition

Namespace: Org.BouncyCastle.Math
Assembly: BouncyCastle.Cryptography (in BouncyCastle.Cryptography.dll) Version: 2.3.0-beta.187+d6da5648ae
public static bool IsMRProbablePrimeToBase(
	BigInteger candidate,
	BigInteger baseValue
)

Parameters

candidate  BigInteger
The BigInteger instance to test for primality.
baseValue  BigInteger
The base value to use for this iteration.

Return Value

Boolean
false if baseValue is a witness to compositeness (so candidate is definitely NOT prime), or else true.

Remarks

Run a single iteration of the Miller-Rabin algorithm against the specified base.

See Also