0

In the ECDSA algorithm (verification signature) you have to calculate a new point using the next formula: (x0,y0) = u1*P+U2*P_a

How can I calculate the coordenates of this new point?, i try that sentence in SAGE but it doesn't work.

X = (Integer(u1)*P)+(Integer(u2)*P_a)

Can you help me?. Thank you very much.

You can download code and try to execute in SAGE here: https://dl.dropbox.com/u/39374382/question.sws

vem
  • 93
  • 1
  • 7
  • It seems like you have three similar questions in one day or so. I've asked some people who might respond, but you may also want to try ask.sagemath.org, where more Sage developers hang out, if this doesn't get any answers in a day or so. – kcrisman Jun 15 '12 at 13:12

1 Answers1

3

If P1 and P2 are points on (the same) elliptic curve E and a,b are integers then

Q = a*P1 + b*P2

certainly works. And you can get the coordinates out of the point Q using Q.xy().

Example:

sage: E = EllipticCurve('389a1')
sage: P1,P2 = E.gens(); P1,P2
((-1 : 1 : 1), (0 : -1 : 1))
sage: Q = 3*P1-2*P2; Q
(-5/49 : 62/343 : 1)
sage: Q.xy()
(-5/49, 62/343)
DSM
  • 342,061
  • 65
  • 592
  • 494
John Cremona
  • 166
  • 1
  • 2
  • In my case it doesn't work, i thnik that u1 and u2 are integer too big. You can download and try it. – vem Jun 15 '12 at 13:35
  • I can't open your dropbox file. It gives me a 404 error. Maybe you can publish your worksheet on sagenb.org – Maarten Derickx Jun 23 '12 at 14:06