Expand description
Randomization of big integers
Structs§
- Random
Bits - A random distribution for
BigUintandBigIntvalues of a particular bit size. - SMALL_
PRIMES_ 🔒PRODUCT - The product of the values in SMALL_PRIMES and allows us to reduce a candidate prime by this number and then determine whether it’s coprime to all the elements of SMALL_PRIMES without further BigUint operations.
- Uniform
BigInt - The back-end implementing rand’s
UniformSamplerforBigInt. - Uniform
BigUint - The back-end implementing rand’s
UniformSamplerforBigUint.
Constants§
- SMALL_
PRIMES 🔒 - A list of small, prime numbers that allows us to rapidly exclude some fraction of composite candidates when searching for a random prime. This list is truncated at the point where smallPrimesProduct exceeds a u64. It does not include two because we ensure that the candidates are odd by construction.
Traits§
- Rand
BigInt - Rand
Prime - A generic trait for generating random primes.