From c5021c0690d1a9c5093014d2bcb52565b3a0b431 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 14 May 2025 03:18:35 -0500 Subject: [PATCH] wolfcrypt/src/ecc.c: fix identicalInnerCondition in ecc_mulmod(). --- wolfcrypt/src/ecc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index d15f796f9..bff20384a 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -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);