Scalar Multiplication: LSB first. code in sagemath

asked 6 years ago

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

Preview: (hide)

Comments

What have you tried?

slelievre gravatar imageslelievre ( 6 years ago )
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=(km1,km2,,k0) . (And explain it...)

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

dan_fulea gravatar imagedan_fulea ( 6 years ago )