Ask Your Question
1

Elliptic curve scalar multiplication algorithm

asked 2016-03-25 14:41:10 +0100

Belphegor gravatar image

updated 2017-01-08 12:08:08 +0100

FrédéricC gravatar image

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 flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-03-31 16:43:09 +0100

vdelecroix gravatar image

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!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-03-25 14:41:10 +0100

Seen: 856 times

Last updated: Mar 31 '16