Clamp the normalization value at the end of sp_mont_norm.

This commit is contained in:
Hayden Roche
2021-01-11 09:59:11 -06:00
parent 54f072fd8d
commit a3cc4110b0

View File

@ -12290,6 +12290,7 @@ int sp_mont_norm(sp_int* norm, sp_int* m)
if ((err == MP_OKAY) && (bits == SP_WORD_SIZE)) { if ((err == MP_OKAY) && (bits == SP_WORD_SIZE)) {
norm->dp[0] %= m->dp[0]; norm->dp[0] %= m->dp[0];
} }
sp_clamp(norm);
return err; return err;
} }