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.
 
 

17 lines
255 B

const bigInt = require("big-integer");
module.exports = class ZqField {
constructor(p) {
this.p = p;
}
add(a, b) {
return a.add(b).mod(this.p);
}
lt(a, b) {
return a.lt(b) ? bigInt(1) : bigInt(0);
}
};