BN_is_prime_fasttest_ex function
BN_is_prime_fasttest_ex returns one if |candidate| is probably a prime number by the Miller-Rabin test, zero if it's certainly not and -1 on error.
If |do_trial_division| is non-zero then |candidate| will be tested against a list of small primes before Miller-Rabin tests. The probability of this function returning one when |candidate| is composite is at most 2^{2*checks}. See |BN_prime_checks_for_validation| and |BN_prime_checks_for_generation| for recommended values of |checks|.
If |cb| is not NULL then it is called during the checking process. See the comment above |BN_GENCB|.
WARNING: deprecated. Use |BN_primality_test|.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<BIGNUM>,
ffi.Int,
ffi.Pointer<BN_CTX>,
ffi.Int,
ffi.Pointer<BN_GENCB>,
)
>(symbol: 'bssl_dart_BN_is_prime_fasttest_ex')
external int BN_is_prime_fasttest_ex(
ffi.Pointer<BIGNUM> candidate,
int checks,
ffi.Pointer<BN_CTX> ctx,
int do_trial_division,
ffi.Pointer<BN_GENCB> cb,
);