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. | |
Variables | |
const int | PRIMEN = 564 |
Number of 12-bit primes. | |
const limb_type | PRIME [PRIMEN] |
List of all 12-bit primes. |
|
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.
|
|
List of all 12-bit primes.
|
|
Number of 12-bit primes.
|