зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla Bug 329575: ECPoint_mul should multiply a point by the group order
faithfully because this operation is required by the public key validation algorithm. r=douglas.stebila,vipul.gupta.
This commit is contained in:
Родитель
d9589981d2
Коммит
a0ed51d33e
|
@ -57,7 +57,7 @@ ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
|
|||
MP_DIGITS(&kt) = 0;
|
||||
|
||||
/* want scalar to be less than or equal to group order */
|
||||
if (mp_cmp(k, &group->order) >= 0) {
|
||||
if (mp_cmp(k, &group->order) > 0) {
|
||||
MP_CHECKOK(mp_init(&kt));
|
||||
MP_CHECKOK(mp_mod(k, &group->order, &kt));
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче