I have this bitcoin curve:
y^2 = x^3 + 7
but the finite field Fp is modified to be:
n=115792089237316195423570985008687907853269984665640564039457584007908834675927
1-What is the G point?
2-how to get the Y coordinate for any X value?
I'm using this C# code to get Y from X but it works with original bitcoin curve only.
public BigInteger mod(BigInteger num, BigInteger by) {
BigInteger res = num % by;
if (res < 0) { res += by; }
return res;
}
public BigInteger EC_GetY(BigInteger x, bool modIt, BigInteger n) {
BigInteger n_OVER_FOUR = (n + 1) / 4;
BigInteger alpha = mod(BigInteger.Pow(x, 3) + 7, n);
BigInteger beta = BigInteger.ModPow(alpha, n_OVER_FOUR, n);//SqRtN
BigInteger Y = beta;
if (!modIt) { return Y; }
Y = n - beta;
return Y;
}