Montgomery reduction: Difference between revisions

mark for attention
m (→‎{{header|Go}}: removed timing)
(mark for attention)
Line 1:
{{clarify task}}{{draft task}}
Implement the [[wp:Montgomery reduction|Montgomery reduction]] algorithm, as explained in "Handbook of Applied Cryptography, Section 14.3.2, page 600. Montgomery reduction calculates <math>T R^{-1} \mathrm{mod} m</math>, without having to divide by <math>m</math>.
* Let <math>M</math> be a positive integer, and <math>R</math> and <math>T</math> integers such that <math>R > m</math>, <math>\mathrm{gcd}(m, R) = 1</math>, and <math>0 \le T < mR</math>.
Anonymous user