This commit is contained in:
Steffen Jaeckel 2017-06-06 21:34:53 +02:00
parent 5b8e73a9fc
commit 96624b3719

View File

@ -61,9 +61,9 @@ int mp_exteuclid(mp_int *a, mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3)
/* make sure U3 >= 0 */
if (u3.sign == MP_NEG) {
if ((err = mp_neg(&u1, &u1)) != MP_OKAY) { goto _ERR; }
if ((err = mp_neg(&u2, &u2)) != MP_OKAY) { goto _ERR; }
if ((err = mp_neg(&u3, &u3)) != MP_OKAY) { goto _ERR; }
if ((err = mp_neg(&u1, &u1)) != MP_OKAY) { goto LBL_ERR; }
if ((err = mp_neg(&u2, &u2)) != MP_OKAY) { goto LBL_ERR; }
if ((err = mp_neg(&u3, &u3)) != MP_OKAY) { goto LBL_ERR; }
}
/* copy result out */