MPI Algorithms
Two operand addition
word* x | the first operand (and output) |
size_t x_size | size of x |
word* y | the second operand |
size_t y_size | size of y (must be >= x_size) |
Three operand addition
Two operand addition with carry out
Three operand addition with carry out
Two operand subtraction
Two operand subtraction, x = y - x; assumes y >= x
Three operand subtraction
Montgomery Reduction
word* z | integer to reduce, of size exactly 2*(p_size+1). Output is in the first p_size+1 words, higher words are set to zero. |
word* p | modulus |
size_t p_size | size of p |
word p_dash | Montgomery value |
word* ws | workspace array of at least 2*(p_size+1) words |
Compare x and y
Compute ((n1<
Compute ((n1<