circom/c/zqfield.h
c/zqfield.hRaw
1#ifndef ZQFIELD_H
2#define ZQFIELD_H
3
4#include "circom.h"
5
6class ZqField {
7 mpz_t tmp;
8
9public:
10 BigInt p;
11 BigInt one;
12 BigInt zero;
13 ZqField(PBigInt ap);
14 ~ZqField();
15
16 void copyn(PBigInt a, PBigInt b, int n);
17 void add(PBigInt r,PBigInt a, PBigInt b);
18 void sub(PBigInt r,PBigInt a, PBigInt b);
19 void mul(PBigInt r,PBigInt a, PBigInt b);
20 void div(PBigInt r,PBigInt a, PBigInt b);
21 void idiv(PBigInt r,PBigInt a, PBigInt b);
22 void mod(PBigInt r,PBigInt a, PBigInt b);
23 void lt(PBigInt r, PBigInt a, PBigInt b);
24 void eq(PBigInt r, PBigInt a, PBigInt b);
25 void gt(PBigInt r, PBigInt a, PBigInt b);
26 void leq(PBigInt r, PBigInt a, PBigInt b);
27 void geq(PBigInt r, PBigInt a, PBigInt b);
28 void neq(PBigInt r, PBigInt a, PBigInt b);
29 int isTrue(PBigInt a);
30};
31
32#endif // ZQFIELD_H