Circom operates over the prime field of p = 21888242871839275222246405745257275088548364400416034343698204186575808495617
which is the Field Modulus of BN254
curve. This might be because of the existing support for BN254
curves in the Ethereum ecosystem like precompiles (add, mul, pairing), powers of tau parameters & so on.
Circom supports these curves as of now : bn128
, bls12381
, goldilocks
, grumpkin
, pallas
, vesta
. Refer here
To add your choice of curve & tweak the prime field of circom, follow the given steps :