CRS
Isogeny-based post-quantum Diffie-Hellman protocol.
models.h
1#ifndef _MODELS_H_
2#define _MODELS_H_
3
4#include <stdio.h>
5#include <stdlib.h>
6
7#include "auxiliary.h"
8
9#include <gmp.h>
10#include <flint/fmpz.h>
11#include <flint/fq.h>
12
13/*********************************************
14 Short Weierstrass curves structure
15*********************************************/
16typedef struct SW_curve_t{
17
18 const fq_ctx_t *F; // base field
19 fq_t a, b; // curve parameters
21
22/*********************************************
23 Short Weierstrass points structure
24*********************************************/
25typedef struct SW_point_t{
26
27 fq_t x, y, z; // coordinates
28 SW_curve_t *E; // base curve
30
31/*********************************************
32 Montgomery curves structure
33*********************************************/
34typedef struct MG_curve_t{
35
36 const fq_ctx_t *F;
37 fq_t A, B;
39
40/*********************************************
41 Montgomery points structure
42*********************************************/
43typedef struct MG_point_t{
44
45 MG_curve_t *E; // base curve
46 fq_t X, Z; // coordinates
48
49/*********************************************
50 Tate normal curves structure
51*********************************************/
52typedef struct TN_curve_t{
53
54 const fq_ctx_t *F; // base field
55 fmpz_t l; // torsion of (0,0)
56 fq_t b, c; // coordinates
58
59#endif
60
Definition: models.h:34
Definition: models.h:43
Definition: models.h:16
Definition: models.h:25
Definition: models.h:52