BN_generate_prime.pod (109998) | BN_generate_prime.pod (111147) |
---|---|
1=pod 2 3=head1 NAME 4 5BN_generate_prime, BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality 6 7=head1 SYNOPSIS 8 --- 56 unchanged lines hidden (view full) --- 65BN_is_prime_fasttest(), when called with B<do_trial_division == 1>, 66first attempts trial division by a number of small primes; 67if no divisors are found by this test and B<callback> is not B<NULL>, 68B<callback(1, -1, cb_arg)> is called. 69If B<do_trial_division == 0>, this test is skipped. 70 71Both BN_is_prime() and BN_is_prime_fasttest() perform a Miller-Rabin 72probabilistic primality test with B<checks> iterations. If | 1=pod 2 3=head1 NAME 4 5BN_generate_prime, BN_is_prime, BN_is_prime_fasttest - generate primes and test for primality 6 7=head1 SYNOPSIS 8 --- 56 unchanged lines hidden (view full) --- 65BN_is_prime_fasttest(), when called with B<do_trial_division == 1>, 66first attempts trial division by a number of small primes; 67if no divisors are found by this test and B<callback> is not B<NULL>, 68B<callback(1, -1, cb_arg)> is called. 69If B<do_trial_division == 0>, this test is skipped. 70 71Both BN_is_prime() and BN_is_prime_fasttest() perform a Miller-Rabin 72probabilistic primality test with B<checks> iterations. If |
73B | 73B<checks == BN_prime_checks>, a number of iterations is used that |
74yields a false positive rate of at most 2^-80 for random input. 75 76If B<callback> is not B<NULL>, B<callback(1, j, cb_arg)> is called 77after the j-th iteration (j = 0, 1, ...). B<ctx> is a 78pre-allocated B<BN_CTX> (to save the overhead of allocating and 79freeing the structure in a loop), or B<NULL>. 80 81=head1 RETURN VALUES --- 21 unchanged lines hidden --- | 74yields a false positive rate of at most 2^-80 for random input. 75 76If B<callback> is not B<NULL>, B<callback(1, j, cb_arg)> is called 77after the j-th iteration (j = 0, 1, ...). B<ctx> is a 78pre-allocated B<BN_CTX> (to save the overhead of allocating and 79freeing the structure in a loop), or B<NULL>. 80 81=head1 RETURN VALUES --- 21 unchanged lines hidden --- |