Skip to content

Commit

Permalink
Fix bugs in conversion to template.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Mar 29, 2024
1 parent 3db85f8 commit 1ffffb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/tmpl/relic_ep_add_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@
F##_copy(t2, C##_curve_get_a()); \
F##_add(t4, q->x, p->x); \
F##_add(t5, q->y, p->y); \
F##_dbl(r->z, t4); \
F##_add(r->z, r->z, t4); \
C##_curve_mul_a(r->z, r->z); \
C##_curve_mul_b(r->z, r->z); \
C##_curve_mul_a(r->z, t4); \
F##_dbl(r->y, C##_curve_get_b()); \
F##_add(r->y, r->y, C##_curve_get_b()); \
F##_add(r->z, r->z, r->y); \
} else { \
C##_curve_mul_a(t2, p->z); \
F##_mul(t4, q->x, p->z); \
Expand All @@ -238,8 +238,6 @@
F##_add(t5, t5, p->y); \
F##_dbl(r->x, p->z); \
F##_add(r->x, r->x, p->z); \
F##_dbl(r->y, r->x); \
F##_add(r->x, r->x, r->y); \
C##_curve_mul_b(r->x, r->x); \
C##_curve_mul_a(r->z, t4); \
F##_add(r->z, r->x, r->z); \
Expand Down
1 change: 1 addition & 0 deletions src/tmpl/relic_ep_dbl_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
F##_dbl(t5, t0); \
F##_add(t5, t5, t0); \
if (p->coord != BASIC) { \
F##_sqr(t3, t3); \
C##_curve_mul_a(t1, t3); \
F##_add(t5, t5, t1); \
} else { \
Expand Down

0 comments on commit 1ffffb0

Please sign in to comment.