Name Description Size
curve_nistp.h NIST Prime reduction functions. Reduces the value in place ws is a workspace function which is used as a temporary, and will be resized as needed. 1360
dsa_gen.cpp Check if this size is allowed by FIPS 186-3 3308
info.txt 234
jacobi.cpp Calculate the Jacobi symbol 912
make_prm.cpp In this case, p is a multiple of PRIMES[i] 7751
mod_inv.cpp Sets result to a^-1 * 2^k mod a with n <= k <= 2n Returns k "The Montgomery Modular Inverse - Revisited" Çetin Koç, E. Savas https://citeseerx.ist.psu.edu/viewdoc/citations?doi=10.1.1.75.8377 A const time implementation of this algorithm is described in "Constant Time Modular Inversion" Joppe W. Bos http://www.joppebos.com/files/CTInversion.pdf 9081
monty.cpp 11929
monty.h The Montgomery representation of an integer 5301
monty_exp.cpp 7564
monty_exp.h Precompute for calculating values g^x mod p 1265
mp_numth.cpp Square a BigInt 1827
nistp_redc.cpp Check if we need to reduce modulo P There are two possible cases: - The result overflowed past 521 bits, in which case bit 522 will be set - The result is exactly 2**521 - 1 19110
numthry.cpp Return the number of 0 bits at the end of n 5696
numthry.h Fused multiply-add @param a an integer @param b an integer @param c an integer @return (a*b)+c 9719
pow_mod.cpp Fixed Window Exponentiator 8190
pow_mod.h Modular Exponentiator Proxy 3141
primality.cpp -1 is the trivial square root of unity, so ``a`` is not a witness for this number - give up 4771
primality.h Perform Lucas primality test @see FIPS 186-4 C.3.3 @warning it is possible to construct composite integers which pass this test alone. @param n the positive integer to test @param mod_n a pre-created Modular_Reducer for n @return true if n seems probably prime, false if n is composite 3178
primes.cpp 46016
reducer.cpp Modular_Reducer Constructor 3017
reducer.h Modular Reducer (using Barrett's technique) 1698
ressol.cpp Tonelli-Shanks algorithm 1966