Anonymous user
Montgomery reduction: Difference between revisions
m
→{{header|zkl}}: tweak
(→{{header|Tcl}}: added zkl) |
m (→{{header|zkl}}: tweak) |
||
Line 316:
fcn montgomeryReduce(modulus,T){
_assert_(modulus.isOdd);
a:=BN(T); // we'll do in place math
do(modulus.len(2)){ // bits needed to hold modulus
if(a.isOdd) a.add(modulus);
a.div(2); // a>>=1
|