#include <stdexcept>
#include <mpi.h>
#include <prime.h>
Namespaces | |
namespace | mp |
namespace | mp::prime |
Functions | |
bool | pt_small (const mpi &x) |
Test number against small primes (8 or 12 bit). | |
bool | rabin_miller (const mpi &p, const mpi &m, const limb_type b) |
Actual Rabin-Miller primality test. | |
bool | pt_prob (const mpi &x, int n) |
Run through a few probabilistic tests. |
|
Run through a few probabilistic tests. This sets up the precomputation for the Rabin-Miller probabilistic primality test.
|
|
Test number against small primes (8 or 12 bit).
|
|
Actual Rabin-Miller primality test. This is described in detail on page 260 of _Handbook of Applied Cryptography Second Edition_ by Bruce Schneier.
|