mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
@@ -2479,6 +2479,8 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
|
|||||||
return MP_MEM;
|
return MP_MEM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
XMEMSET(W, 0, (n->used * 2 + 1) * sizeof(mp_word));
|
||||||
|
|
||||||
/* first we have to get the digits of the input into
|
/* first we have to get the digits of the input into
|
||||||
* an array of double precision words W[...]
|
* an array of double precision words W[...]
|
||||||
*/
|
*/
|
||||||
@@ -2496,11 +2498,6 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
|
|||||||
for (ix = 0; ix < x->used; ix++) {
|
for (ix = 0; ix < x->used; ix++) {
|
||||||
*_W++ = *tmpx++;
|
*_W++ = *tmpx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* zero the high words of W[a->used..m->used*2] */
|
|
||||||
for (; ix < n->used * 2 + 1; ix++) {
|
|
||||||
*_W++ = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now we proceed to zero successive digits
|
/* now we proceed to zero successive digits
|
||||||
|
Reference in New Issue
Block a user