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 mul(PBigInt r,PBigInt a, PBigInt b);
19 void lt(PBigInt r, PBigInt a, PBigInt b);
20 void eq(PBigInt r, PBigInt a, PBigInt b);
21 void gt(PBigInt r, PBigInt a, PBigInt b);
22 void leq(PBigInt r, PBigInt a, PBigInt b);
23 void geq(PBigInt r, PBigInt a, PBigInt b);
24 void neq(PBigInt r, PBigInt a, PBigInt b);
25 int isTrue(PBigInt a);
26};
27
28#endif // ZQFIELD_H