Name Description Size
info.txt 214
mp_asmi.h Expressing an add with carry is sadly quite difficult in standard C/C++. Compilers will recognize various idioms and generate a reasonable carry chain. Unfortunately which idioms the compiler will understand vary, so we have to decide what to do based on the compiler. This is fragile; what will work varies not just based on compiler but also version, target architecture, and optimization flags. 17928
mp_comba.cpp Comba 4x4 Squaring 55946
mp_core.h If cond == 0, does nothing. If cond > 0, swaps x[0:size] with y[0:size] Runs in constant time 33120
mp_karat.cpp Simple O(N^2) Multiplication 9759
mp_monty.cpp Montgomery reduction - product scanning form Algorithm 5 from "Energy-Efficient Software Implementation of Long Integer Modular Arithmetic" (https://www.iacr.org/archive/ches2005/006.pdf) See also https://eprint.iacr.org/2013/882.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/1996/01/j37acmon.pdf 2360
mp_monty_n.cpp 69951