From 2db28d5179162f5cf2f9531ae26f882d5ce79c91 Mon Sep 17 00:00:00 2001 From: "Diego F. Aranha" Date: Wed, 14 Aug 2024 22:10:44 +0200 Subject: [PATCH] Another fix. --- src/epx/relic_ep3_mul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/epx/relic_ep3_mul.c b/src/epx/relic_ep3_mul.c index b09ca701f..98b266d7d 100644 --- a/src/epx/relic_ep3_mul.c +++ b/src/epx/relic_ep3_mul.c @@ -108,7 +108,6 @@ static void ep3_mul_gls_imp(ep3_t r, const ep3_t p, const bn_t k) { ep3_new(t[i]); } - ep3_curve_get_ord(n); fp_prime_get_par(u); if (ep_curve_is_pairf() == EP_SG18) { /* Compute base -3*u for the recoding below. */ @@ -116,6 +115,7 @@ static void ep3_mul_gls_imp(ep3_t r, const ep3_t p, const bn_t k) { bn_add(u, u, n); bn_neg(u, u); } + ep3_curve_get_ord(n); bn_mod(_k[0], k, n); bn_rec_frb(_k, 6, _k[0], u, n, ep_curve_is_pairf() == EP_BN); even = bn_is_even(_k[0]); @@ -216,7 +216,6 @@ static void ep3_mul_reg_gls(ep3_t r, const ep3_t p, const bn_t k) { ep3_new(t[i]); } - ep3_curve_get_ord(n); fp_prime_get_par(u); if (ep_curve_is_pairf() == EP_SG18) { /* Compute base -3*u for the recoding below. */ @@ -224,6 +223,7 @@ static void ep3_mul_reg_gls(ep3_t r, const ep3_t p, const bn_t k) { bn_add(u, u, n); bn_neg(u, u); } + ep3_curve_get_ord(n); bn_mod(_k[0], k, n); bn_rec_frb(_k, 6, _k[0], u, n, ep_curve_is_pairf() == EP_BN); even = bn_is_even(_k[0]);