ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 21 Jan 2017 10:54:39 +0100i want sage code for following Double and add algorithm for elliptic curvehttps://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/N ← P
Q ← 0
for i from 0 to m do
if di = 1 then
Q ← point_add(Q, N)
N ← point_double(N)
return QFri, 20 Jan 2017 15:37:11 +0100https://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/Comment by tmonteil for <p>N ← P
Q ← 0
for i from 0 to m do
if di = 1 then
Q ← point_add(Q, N)
N ← point_double(N)
return Q</p>
https://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/?comment=36360#post-id-36360Looks like a duplicate, see : https://ask.sagemath.org/question/36022/sage-codes-for-double-and-add-algorithm-for-scalar-multiplication-over-elliptic-curve-over-prime-field/Sat, 21 Jan 2017 10:54:39 +0100https://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/?comment=36360#post-id-36360Answer by nbruin for <p>N ← P
Q ← 0
for i from 0 to m do
if di = 1 then
Q ← point_add(Q, N)
N ← point_double(N)
return Q</p>
https://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/?answer=36359#post-id-36359The code that sage uses is here: https://git.sagemath.org/sage.git/tree/src/sage/structure/coerce_actions.pyx#n786Sat, 21 Jan 2017 07:50:52 +0100https://ask.sagemath.org/question/36355/i-want-sage-code-for-following-double-and-add-algorithm-for-elliptic-curve/?answer=36359#post-id-36359