Author

Topic: x , y coordination division (Read 1064 times)

member
Activity: 88
Merit: 12
August 07, 2015, 09:25:32 AM
#4
Looks like you posted the same question on the Bitcoin SE (http://bitcoin.stackexchange.com/questions/38978/x-y-coordination-division). Hope between Andytoshi's answer and mine, you got what you needed.
newbie
Activity: 16
Merit: 1
August 06, 2015, 09:23:47 PM
#3
Hi sss555,

Sorry I missed your message about this the other day about this.

From reading your code I understand you have some point P, then 2*P = (xx, yy) while 4*P = (xx, yy). You then compute (a, b) = (xx/2, yy/2), and expect this to be equal to 2*P.

This won't be the case because "2*P" does not mean "the point whose coordinates are twice P's". It actually means P + P, where addition is defined according to the elliptic curve group law.

To contrast, when you multiply coordinates by numbers, you are simply multiplying them modulo p. This can still be described as repeated addition, but this addition is ordinary arithmetic addition modulo p, nothing exotic.

Does this clarify things?

Andrew



Thank you I understand
full member
Activity: 179
Merit: 151
-
August 06, 2015, 10:55:06 AM
#2
Hi sss555,

Sorry I missed your message about this the other day about this.

From reading your code I understand you have some point P, then 2*P = (xx, yy) while 4*P = (xx, yy). You then compute (a, b) = (xx/2, yy/2), and expect this to be equal to 2*P.

This won't be the case because "2*P" does not mean "the point whose coordinates are twice P's". It actually means P + P, where addition is defined according to the elliptic curve group law.

To contrast, when you multiply coordinates by numbers, you are simply multiplying them modulo p. This can still be described as repeated addition, but this addition is ordinary arithmetic addition modulo p, nothing exotic.

Does this clarify things?

Andrew
newbie
Activity: 16
Merit: 1
August 05, 2015, 10:15:40 PM
#1
python code

def inverse(x, p):

    return pow(x,p-2,p)

p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f

#private key 2 -->(x , y) value

xx =  0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5L
yy =  0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52aL

#private key 4 -->(x , y) value

x  =  0xe493dbf1c10d80f3581e4904930b1404cc6c13900ee0758474fa94abe8c4cd13L
y  =  0x51ed993ea0d455b75642e2098ea51448d967ae33bfbdfe40cfe97bdc47739922L

a= (x*inverse(xx,p))%p

print "x = " + hex(a)

b= (y*inverse(yy,p))%p

print "y = " + hex(b)

output

x = 0x1d8a71dd4218a520a1f976b6a4f66ed600880baf69d401a73dd010dd60f859ffL
y = 0x8f73b0d00f8d9e262cc230b7a6bee35d44ac898986195e819d68ecafd6b7803bL

normal math 4/2 = 2

but here private key 2 x,y value divided by private key 4 x,y value, not provide correct value of x,y

bitcoin , math learning
Jump to: