- abs
BigInt abs(BigInt n)
Return the absolute value
- checkPrime
bool checkPrime(BigInt n, RandomNumberGenerator rng)
Undocumented in source. Be warned that the author may not have intended to support it.
- fips1863ValidSize
bool fips1863ValidSize(size_t pbits, size_t qbits)
Undocumented in source. Be warned that the author may not have intended to support it.
- gcd
BigInt gcd(BigInt a, BigInt b)
Compute the greatest common divisor
- generateDsaPrimes
Vector!ubyte generateDsaPrimes(RandomNumberGenerator rng, AlgorithmFactory af, BigInt p_out, BigInt q_out, size_t pbits, size_t qbits)
Generate DSA parameters using the FIPS 186 kosherizer
- generateDsaPrimes
bool generateDsaPrimes(RandomNumberGenerator rng, AlgorithmFactory af, BigInt p_out, BigInt q_out, size_t pbits, size_t qbits, Vector!ubyte seed_c)
Generate DSA parameters using the FIPS 186 kosherizer
- inverseMod
BigInt inverseMod(BigInt n, BigInt mod)
- inverseModOddModulus
BigInt inverseModOddModulus(BigInt n, BigInt mod)
Undocumented in source. Be warned that the author may not have intended to support it.
- isPrime
bool isPrime(BigInt n, RandomNumberGenerator rng, size_t prob, bool is_random)
Check for primality using Miller-Rabin
- jacobi
int jacobi(BigInt a, BigInt n)
- lcm
BigInt lcm(BigInt a, BigInt b)
- lowZeroBits
size_t lowZeroBits(BigInt n)
- montyInverse
word montyInverse(word input)
Undocumented in source. Be warned that the author may not have intended to support it.
- mrTestIterations
size_t mrTestIterations(size_t n_bits, size_t prob, bool random)
Undocumented in source. Be warned that the author may not have intended to support it.
- mrWitness
bool mrWitness(BigInt y, T reducer_n, BigInt n_minus_1, size_t s)
Undocumented in source. Be warned that the author may not have intended to support it.
- mulAdd
BigInt mulAdd(BigInt a, BigInt b, BigInt c)
- powerMod
BigInt powerMod(BigInt base, BigInt exp, BigInt mod)
- quickCheckPrime
bool quickCheckPrime(BigInt n, RandomNumberGenerator rng)
Undocumented in source. Be warned that the author may not have intended to support it.
- randomPrime
BigInt randomPrime(RandomNumberGenerator rng, size_t bits, BigInt coprime, size_t equiv, size_t modulo)
Randomly generate a prime
- randomSafePrime
BigInt randomSafePrime(RandomNumberGenerator rng, size_t bits)
Return a random 'safe' prime, of the form p=2*q+1 with q prime
- ressol
BigInt ressol(BigInt a, BigInt p)
Compute the square root of x modulo a prime using the
Shanks-Tonnelli algorithm
- square
BigInt square(BigInt x)
- subMul
BigInt subMul(BigInt a, BigInt b, BigInt c)
- verifyPrime
bool verifyPrime(BigInt n, RandomNumberGenerator rng)
Undocumented in source. Be warned that the author may not have intended to support it.
Number Theory Functions