fqmul multiplies a*b modulo q using montgomeryreduce. It assumes that a and b are already reduced and in the range [0,q).
int fqmul(int a, int b) { return montgomeryreduce(a * b); }