B_CTX will be used.</p>

<p>BN_check_prime(), BN_is_prime_ex(), BN_is_prime_fasttest_ex(), BN_is_prime() and BN_is_prime_fasttest() test if the number <b>p</b> is prime. The functions tests until one of the tests shows that <b>p</b> is composite, or all the tests passed. If <b>p</b> passes all these tests, it is considered a probable prime.</p>

<p>The test performed on <b>p</b> are trial division by a number of small primes and rounds of the of the Miller-Rabin probabilistic primality test.</p>

<p>The fun