You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
654 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #ifndef ZQFIELD_H
  2. #define ZQFIELD_H
  3. #include "circom.h"
  4. class ZqField {
  5. mpz_t tmp;
  6. public:
  7. BigInt p;
  8. BigInt one;
  9. BigInt zero;
  10. ZqField(PBigInt ap);
  11. ~ZqField();
  12. void copyn(PBigInt a, PBigInt b, int n);
  13. void add(PBigInt r,PBigInt a, PBigInt b);
  14. void mul(PBigInt r,PBigInt a, PBigInt b);
  15. void lt(PBigInt r, PBigInt a, PBigInt b);
  16. void eq(PBigInt r, PBigInt a, PBigInt b);
  17. void gt(PBigInt r, PBigInt a, PBigInt b);
  18. void leq(PBigInt r, PBigInt a, PBigInt b);
  19. void geq(PBigInt r, PBigInt a, PBigInt b);
  20. void neq(PBigInt r, PBigInt a, PBigInt b);
  21. int isTrue(PBigInt a);
  22. };
  23. #endif // ZQFIELD_H