Skip to content

Commit

Permalink
Another fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Aug 14, 2024
1 parent b351031 commit 2db28d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/epx/relic_ep3_mul.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ 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. */
bn_dbl(n, u);
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]);
Expand Down Expand Up @@ -216,14 +216,14 @@ 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. */
bn_dbl(n, u);
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]);
Expand Down

0 comments on commit 2db28d5

Please sign in to comment.