mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Clamp the normalization value at the end of sp_mont_norm.
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user