basic_exponent_mod
return basic_exponent_mod(G, X, P, Y, 1);
return basic_exponent_mod(G, X, P, Y, 0);