Generate a prime of approximately bits (deprecated; prefer BN_generate_prime_ex).
Declared in <openssl/bn.h>
[[deprecated]]
BIGNUM*
BN_generate_prime(
BIGNUM* ret,
int bits,
int safe,
BIGNUM const* add,
BIGNUM const* rem,
void(* callback)(int, int, void*),
void* cb_arg);
Deprecated. Use of this entity is allowed but discouraged.
Generated prime BIGNUM, or NULL on error.
| Name | Description |
|---|---|
| ret | Destination BIGNUM, or NULL to allocate a new one. |
| bits | Desired bit length of the prime. |
| safe | Nonzero to require a safe prime ((p-1)/2 also prime). |
| add | Optional congruence modulus constraint, or NULL. |
| rem | Optional remainder for the add constraint, or NULL. |
| callback | Progress callback, or NULL. |
| cb_arg | User argument passed to callback. |