aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/templates/defs.h
blob: 5a3875fdc76fff389a7eac71446029291ddf24a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef DEFS_H_
#define DEFS_H_

#include <stdlib.h>
#include "bn.h"

typedef struct {
	{%- for variable in variables %}
	bn_t {{ variable }};
	{%- endfor %}
	bool infinity;
} point_t;

typedef struct {
	bn_t p;
	red_t p_red;
    {%- for param in params %}
    bn_t {{ param }};
    {%- endfor %}
    bn_t n;
    red_t n_red;
    bn_t h;
    point_t *generator;
    point_t *neutral;
} curve_t;

#endif //DEFS_H_