CRS
Isogeny-based post-quantum Diffie-Hellman protocol.
src
EllipticCurves
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
*********************************************/
16
typedef
struct
SW_curve_t
{
17
18
const
fq_ctx_t *F;
// base field
19
fq_t a, b;
// curve parameters
20
}
SW_curve_t
;
21
22
/*********************************************
23
Short Weierstrass points structure
24
*********************************************/
25
typedef
struct
SW_point_t
{
26
27
fq_t x, y, z;
// coordinates
28
SW_curve_t
*E;
// base curve
29
}
SW_point_t
;
30
31
/*********************************************
32
Montgomery curves structure
33
*********************************************/
34
typedef
struct
MG_curve_t
{
35
36
const
fq_ctx_t *F;
37
fq_t A, B;
38
}
MG_curve_t
;
39
40
/*********************************************
41
Montgomery points structure
42
*********************************************/
43
typedef
struct
MG_point_t
{
44
45
MG_curve_t
*E;
// base curve
46
fq_t X, Z;
// coordinates
47
}
MG_point_t
;
48
49
/*********************************************
50
Tate normal curves structure
51
*********************************************/
52
typedef
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
57
}
TN_curve_t
;
58
59
#endif
60
MG_curve_t
Definition:
models.h:34
MG_point_t
Definition:
models.h:43
SW_curve_t
Definition:
models.h:16
SW_point_t
Definition:
models.h:25
TN_curve_t
Definition:
models.h:52
Generated by
1.9.2