Ask Your Question
0

points on elliptic curve

asked 2017-01-24 09:48:54 +0100

Sha gravatar image

updated 2017-01-25 04:51:15 +0100

I have elliptic curve E : [0,0,0,-3267,45630], point P=[51,-108], as well as point Q=[-57,432] on elliptic curve F : [0,27,0,-4077,51705]. I want to find all (m,n) such that x(mP)=x(nQ). I tried doing it using Pari-gp unfortunately it keeps giving error (I am not sure why). Is there a way I can build this code using Sage.

for(m=1,10,for(n=1,10,XX=ellpow(E,P,m);YY=ellpow(F,Q,n);X=XX[1];Y=YY[1];if(X==Y,print(m "\t" n))))
edit retag flag offensive close merge delete

Comments

@Sha - What have you tried?

slelievre gravatar imageslelievre ( 2017-01-24 13:13:23 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-01-24 22:05:56 +0100

castor gravatar image

I guess the second point Q is given by [-57,216]. I use it in what follows.

    E=EllipticCurve([0,0,0,-3267,45630])
    P=E([51,-108])
    Q=E([-57,216])
    [(m,n) for m in [1..10] for n in [1..10] if (m*P)[0]==(n*Q)[0]]

The result is:

[(2, 2), (4, 4), (6, 6), (8, 8), (10, 10)]

e.g. 2P=(339 : 6156 : 1) and 2Q=(339 : -6156 : 1).

edit flag offensive delete link more

Comments

1

Be careful: Looking at P[0] doesn't give you the affine x-coordinate. For instance, if you set

E=EllipticCurve([0,1,0,1,0])
P=E([0,0])
Q=E(0)

the code above would erroneously report that P and Q have the same x-coordinate

You could instead use

T=lambda(P,Q): P[0]*Q[2]==P[2]*Q[0]

or test (m*P).xy()[0] == (n*Q).xy()[0] which does look at the affine coordinates.

nbruin gravatar imagenbruin ( 2017-01-25 01:45:38 +0100 )edit

@castor Sorry I may have to edit my question. Actually point Q is on elliptic curve F : ellinit([0,27,0,-4077,51705]). I overlooked that. Point P is on E, while Q is on elliptic curve F. I will edit my question.

Sha gravatar imageSha ( 2017-01-25 04:50:05 +0100 )edit
1

Thanks @nbruin for the correction, now using the second suggested test we may go as

E=EllipticCurve([0,0,0,-3267,45630])
P=E([51,-108])
F=EllipticCurve([0,27,0,-4077,51705])
Q=F([-57,432])
[(m,n) for m in [1..100] for n in [1..100] if (m*P).xy()[0] == (n*Q).xy()[0]]

the result is simply [].

castor gravatar imagecastor ( 2017-01-25 15:33:28 +0100 )edit

Thank you so much. I can play around with [1..100] to get the desired output.

Sha gravatar imageSha ( 2017-01-26 05:10:51 +0100 )edit

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: 2017-01-24 09:48:54 +0100

Seen: 987 times

Last updated: Jan 25 '17