-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fp12.h
73 lines (40 loc) · 902 Bytes
/
Fp12.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifdef __cplusplus
extern "C" {
#endif
#ifndef FP12_H
#define FP12_H
#include <stdio.h>
#include <stdlib.h>
#include "Fp.h"
#include "Fp2.h"
#include "Fp6.h"
#include "int256.h"
#include "int512.h"
typedef struct Fp12
{
Fp6 x0;
Fp6 x1;
}Fp12; // Fp12 = Fp6[w]/(w^2-v)
Fp12 Fp12_zero();
Fp12 Fp12_one();
int Fp12_equal(Fp12 a, Fp12 b);
Fp12 Fp12_add(Fp12 a,Fp12 b);
Fp12 Fp12_sub(Fp12 a,Fp12 b);
Fp12 Fp12_mul(Fp12 a,Fp12 b);
Fp12 Fp12_mul_by_scalar(Fp12 a, Fp alpha);
void print_Fp12(Fp12 a);
Fp12 Fp12_exp(Fp12 base, int256 exponent);
Fp12 Fp12_inv(Fp12 a);
Fp12 Fp12_div(Fp12 a,Fp12 b);
Fp12 Fp12_mul_by_Fp6(Fp12 a, Fp6 b);
Fp6 Fp12_to_Fp6(Fp12 a);
Fp12 Fp6_to_Fp12(Fp6 a);
int Fp12_is_zero(Fp12 x);
Fp12 Fp12xFp_add(Fp12 a,Fp b);
Fp12 Fp12xFp6_add(Fp12 a, Fp6 b);
Fp12 Fp12_mul_by_Fp2(Fp12 a,Fp2 b);
Fp12 Fp12_frobenius(Fp12 x);
#endif
#ifdef __cplusplus
}
#endif