I am trying to see if there is a way to see if subtraction of 2 points on the elliptical curve resulted in a point before or after G?. Let me explain what I mean by it.
Let's take a point GP. Using the Bitcoin curve equation, for a value of P=10 I get below X and Y G10 =(72488970228380509287422715226575535698893157273063074627791787432852706183111,62070622898698443831883535403436258712770888294397026493185421712108624767191)
Let's take another point GQ for subtraction with GP. for Q=20 I get, G*20 = 34773495056115281091786765947597603724784643419904767525769502836017890139287,8470533044743364938367028725608288731153024648869546164814808839694950063162)
Now subtract GP - GQ, In normal math, it is 10-20= -10, but with EC math I get a point (72488970228380509287422715226575535698893157273063074627791787432852706183111,53721466338617751591687449605251649140499096371243537546272162295800209904472)
which has the same X value as 10 but Y is different. If I add G to the result the point is 9G but with a different value.
I am not sure how it is called (Y inverse ?) but I see it's like a point before G and if I add G it comes closer to G. 9G,8G,7G.... 1G
Another way of seeing this is that Y can have 2 possible values (below is the python code which I used to calculate)
One valve is used for 10 and the other for a point which is a result of subtraction.
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
x = 72488970228380509287422715226575535698893157273063074627791787432852706183111
ysquared = ((xxx+7) % p)
y = pow(ysquared, (p+1)/4, p) print "y1 = %s " % y print "y2 = %s " % (y * -1 % p)
So that question can also be, How to know which Y value to use if a value of X is given,