BN_is_prime_fasttest

Probable-primality test with optional trial division (deprecated).

Synopsis

Declared in <openssl/bn.h>

[[deprecated]]
int
BN_is_prime_fasttest(
    BIGNUM const* p,
    int nchecks,
    void(* callback)(int, int, void*),
    BN_CTX* ctx,
    void* cb_arg,
    int do_trial_division);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 if probably prime, 0 if composite, or -1 on error.

Parameters

NameDescription
pCandidate integer.
nchecksNumber of Miller-Rabin rounds (or BN_prime_checks for default).
callbackOptional progress callback, or NULL.
ctxBN_CTX for temporaries, or NULL.
cb_argUser pointer passed to callback.
do_trial_divisionNon-zero to run small-prime trial division first.