All inputs must be numbers
q must be prime, a, xA, and xB are optional but a must be primitive root of q
Made by Bechara Rizk