Scalar Multiplication: LSB first. code in sagemath

asked 2018-04-09 07:14:24 +0100

santoshi gravatar image

Require k=(km-1,km-2,…,k0)2, km=1 Compute Q=kP Q=0, R=P For i=0 to m-1 If ki=1 then Q=Q+R End if R=2R End for kindly provide me sagemath code for above algorithm for prime field 37 and elliptic curve y^2=x^3+7x+25

edit retag flag offensive close merge delete

Comments

What have you tried?

slelievre gravatar imageslelievre ( 2018-04-09 09:23:48 +0100 )edit
1

Please try to understand the python / sage syntax, and try own code. Even if the code does not work, we will try to make it closer and closer. There is really a big discrepancy between the time and the maturity level needed to understand elliptic curves and work (optimally) in related fields, either on the mathematical, or on the computer side of it, and the time needed to understand how loops work in python, then arrange the data in lists and "put things together".

Please use LaTeX code to display properly mathematical formulas, this is part of "selling the own product". For instance, typing in-line

$k=(k_{m-1}, k_{m-2}, \dots, k_0)$

produces: $k=(k_{m-1}, k_{m-2}, \dots, k_0)$ . (And explain it...)

There are situations when LaTeX and Askbot markup / markdown interfere, but...

dan_fulea gravatar imagedan_fulea ( 2018-04-10 00:30:34 +0100 )edit