Ask Your Question

# points on elliptic curve

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;Y=YY;if(X==Y,print(m "\t" n))))

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted

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)==(n*Q)]


The result is:

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


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

more

## Comments

1

Be careful: Looking at P 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*Q==P*Q


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

@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.

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() == (n*Q).xy()]


the result is simply [].

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

## Your Answer

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

Add Answer

## Stats

Asked: 2017-01-24 09:48:54 +0200

Seen: 362 times

Last updated: Jan 25 '17