Right now, the construct does not check if the passed-in modulus is prime. This can lead to unexpected results and should be fixed.