wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mulmod().

pull/8770/head
Daniel Pouzzner 2025-05-14 03:18:35 -05:00
parent cd79be4928
commit c5021c0690
1 changed files with 2 additions and 4 deletions

View File

@ -3250,10 +3250,8 @@ static int ecc_mulmod(const mp_int* k, ecc_point* P, ecc_point* Q,
#else
/* Swap R[0] and R[1] if other index is needed. */
swap ^= (int)b;
if (err == MP_OKAY) {
err = mp_cond_swap_ct_ex(R[0]->x, R[1]->x, (int)modulus->used, swap,
tmp);
}
err = mp_cond_swap_ct_ex(R[0]->x, R[1]->x, (int)modulus->used, swap,
tmp);
if (err == MP_OKAY) {
err = mp_cond_swap_ct_ex(R[0]->y, R[1]->y, (int)modulus->used, swap,
tmp);