aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/templates/mult_diff_ldr.c
diff options
context:
space:
mode:
authorJ08nY2020-03-02 00:03:57 +0100
committerJ08nY2020-03-02 00:03:57 +0100
commitb3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04 (patch)
tree8a232cf9298772e88bfee7f39b973f0e9009cae3 /pyecsca/codegen/templates/mult_diff_ldr.c
parent0341d359dc67ced3f1e65d1d11af3590c1f0992f (diff)
downloadpyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.tar.gz
pyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.tar.zst
pyecsca-codegen-b3e45bf773cec6ecf3f2a702c0b48c9dbfab0c04.zip
Add reduction functions, add global trigger for whole cmd.
Diffstat (limited to 'pyecsca/codegen/templates/mult_diff_ldr.c')
-rw-r--r--pyecsca/codegen/templates/mult_diff_ldr.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/pyecsca/codegen/templates/mult_diff_ldr.c b/pyecsca/codegen/templates/mult_diff_ldr.c
index 3dd445e..ae74053 100644
--- a/pyecsca/codegen/templates/mult_diff_ldr.c
+++ b/pyecsca/codegen/templates/mult_diff_ldr.c
@@ -1,10 +1,7 @@
#include "mult.h"
#include "point.h"
-#include "action.h"
-{% from "action.c" import start_action, end_action %}
-void scalar_mult(bn_t *scalar, point_t *point, curve_t *curve, point_t *out) {
- {{ start_action("mult") }}
+void scalar_mult_inner(bn_t *scalar, point_t *point, curve_t *curve, point_t *out) {
point_t *p0 = point_copy(&curve->neutral);
point_t *p1 = point_copy(point);
{%- if scalarmult.complete %}
@@ -29,5 +26,4 @@ void scalar_mult(bn_t *scalar, point_t *point, curve_t *curve, point_t *out) {
point_set(p0, out);
point_free(p0);
point_free(p1);
- {{ end_action("mult") }}
} \ No newline at end of file