Ask Your Question
-1

linear distance

asked 2021-07-15 23:14:35 +0100

Miroslaw gravatar image

updated 2022-04-14 10:58:29 +0100

FrédéricC gravatar image

Hello

I want to take linear distance beetween two points on Eliptic curve:

curve : y2=x3+7 secp256k1

p_string = 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F'
p = ZZ( '0x' + p_string.replace(' ', ''))
p
E = EllipticCurve( GF(p), [0, 7] )  
E
n_string = 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE BAAEDCE6 AF48A03B BFD25E8C D0364141'
n = ZZ( '0x' + n_string.replace(' ', '') )



xP = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
yP = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
P = E.point( (xP, yP) ) # Generator point

We have two point on curve y2=x3+7 secp256k1 with above parameter.

Point no 1:

p_1_x=0x28f3c7982219bf067d9723a54bef8e0ae7d970b4285a148685ce98819bd59c99
p_1_y=0x3da6945a85ba67249e96534f3cb93af144301e3ef03f848ebf17fedd55addd14
P1 = E.point( (p_1_x, p_1_y) )

Point no 2:

p_2_x=0xc69b120facc137ad7ecf7407b97f3e1bcecec27ed6617ad1e3bb4f5a265c2230
p_2_y=0xdab461d8de9d194b9aae05cf3fc361e31b0cd172985720a9963a1fd9cb4dab13
P2 = E.point( (p_2_x, p_2_y) )

and we want to know what is P1-P2.

P1 it is p1 * P ( integer * Generator)
P2 it is p2 * P ( integer * Generator)

so : (p1P) - (p2P), but we don't know p1 and p2 , we know only P1 and P2 as point on curve.

but we know when the 2 points P1 and P2 are equal .

the question is there any way to verify and take value P1-P2 as integer ? for example : if p1=5 and p2 =9 , then p1-p2 or P1-P2 = -4

calculation : perform add or mult for equal :

a= 82096204097375626523300693245739453783745399685178560726932375997561515334942 
P1_mult = P1 * a

b= 29894233847412895230616850443375888414306408440111129860511310128693381347651 
P2_add = P2 + b* P

so P1_mult == P2_add

P1 == P2 as P1_mult and P2_add , after calculation so from this expression can we calculate what is P1-P2? so what is linear distance in integer beetween P1 and P2 if we know above information?

at the moment no idea, any tips, solution, How to do?

edit retag flag offensive close merge delete

Comments

Please define "linear distance".

Max Alekseyev gravatar imageMax Alekseyev ( 2021-08-19 01:35:54 +0100 )edit

linear distance: How far are points from each other in integer values not in x,y coordinate

Miroslaw gravatar imageMiroslaw ( 2021-08-19 20:32:29 +0100 )edit

This is still unclear. Please give a formal definition.

Max Alekseyev gravatar imageMax Alekseyev ( 2021-08-19 23:35:17 +0100 )edit

edited question

Miroslaw gravatar imageMiroslaw ( 2021-08-20 09:20:23 +0100 )edit

Doesn't running P1 - P2 in Sage answer your question? It gives

(88142788360802579680349986501633147205599719003358746502313153312017233825713 : 3050891168603837968756581014575221549926190068273143424690722519788244245701 : 1)
Max Alekseyev gravatar imageMax Alekseyev ( 2021-08-20 23:04:52 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-08-28 08:53:02 +0100

Miroslaw gravatar image

solved task

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-07-15 23:14:35 +0100

Seen: 369 times

Last updated: Aug 28 '21