From 787cd9766ff99122075d3c6ad12a0c3e3b33697a Mon Sep 17 00:00:00 2001 From: Vindaar Date: Fri, 12 Jul 2024 14:15:50 +0200 Subject: [PATCH] fix scalarMul_vartime for tiny multiple 5 The code previously accidentally only return 3 for the case 5. --- constantine/math/elliptic/ec_scalar_mul_vartime.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constantine/math/elliptic/ec_scalar_mul_vartime.nim b/constantine/math/elliptic/ec_scalar_mul_vartime.nim index 89357975..438b403d 100644 --- a/constantine/math/elliptic/ec_scalar_mul_vartime.nim +++ b/constantine/math/elliptic/ec_scalar_mul_vartime.nim @@ -81,7 +81,7 @@ func scalarMul_addchain_4bit_vartime[EC](P: var EC, scalar: BigInt) {.tags:[VarT of 5: var t {.noInit.}: EC t.double(P) - t.double(P) + t.double() P ~+= t of 6: var t {.noInit.}: EC