All inputs must be numbers
q must be prime, a and xA are optional but a must be relatively prime to q
Made by Bechara Rizk