aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/templates/point.c
diff options
context:
space:
mode:
authorJ08nY2020-02-28 15:03:36 +0100
committerJ08nY2020-02-28 15:03:36 +0100
commitb387d00511a03dc20e15ac55fcbf07f3dfa79ce0 (patch)
tree6f7c7cb0168366b2862a6e42e20067652cbc443b /pyecsca/codegen/templates/point.c
parent4eafe2d49fc7406861609c5af12b850741bbe5a0 (diff)
downloadpyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.tar.gz
pyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.tar.zst
pyecsca-codegen-b387d00511a03dc20e15ac55fcbf07f3dfa79ce0.zip
Update libtommath, use multi init and clear.
Diffstat (limited to 'pyecsca/codegen/templates/point.c')
-rw-r--r--pyecsca/codegen/templates/point.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pyecsca/codegen/templates/point.c b/pyecsca/codegen/templates/point.c
index aebb7c7..a3c9f59 100644
--- a/pyecsca/codegen/templates/point.c
+++ b/pyecsca/codegen/templates/point.c
@@ -75,7 +75,10 @@ bool point_equals_affine(const point_t *one, const point_t *other, const curve_t
}
void point_to_affine(const point_t *point, const curve_t *curve, bn_t *out_x, bn_t *out_y) {
- {{ ops.render_all(allocations, initializations, operations, returns, frees) }}
+ {{ ops.render_all(allocations, initializations, operations, returns, frees, "err") }}
+ if (err != BN_OKAY) {
+ return;
+ }
{%- if "x" in allocations %}
if (out_x) {
bn_copy(&x, out_x);