# Elliptic curve scalar multiplication algorithm

I'm doing a prespective on supersinguar elliptic curves. I was wondering how saga calculates scalar multiplications? Does it just calculate it naively or does it use succesive doubling as default? Til is most interesting since there are well known ways of making "shortcuts" when oberating with supersingular curves, but does sage use these?

edit retag close merge delete

Sort by » oldest newest most voted

Hello,

Since Sage is open source, you can have a look directly at the source code by yourself. For example doing the following

sage: E = EllipticCurve(QQ,[1,1])
sage: P = E(0,1)
sage: P.__mul__??
Type:           method-wrapper
String form:    <method-wrapper '__mul__' of EllipticCurvePoint_number_field object at 0x7fc3fd625c30>
File:           /opt/sage/src/sage/structure/element.pyx
Source:
def __mul__(left, right):
if type(right) is int:
return (<ModuleElement>left)._mul_long(PyInt_AS_LONG(right))
if type(left) is int:
return (<ModuleElement>right)._mul_long(PyInt_AS_LONG(left))
if have_same_parent_c(left, right):
raise TypeError(arith_error_message(left, right, mul))
return coercion_model.bin_op(left, right, mul)


Though the above code is not very informative. But it tells you that multiplication by scalar is inherited from the generic one in ModuleElement. And this latter code uses successive doubling but you need to look .

Concerning your second question, there does not seem to be any specific code concerning supersingular curve. Any contribution is welcome!

more