BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code> #include &lt;openssl/bn.h&gt;

 int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
                           const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
                           BN_CTX *ctx);

 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
                          const BIGNUM *rem, BN_GENCB *cb);

 int BN_check_prime(const BIGNUM *p,