pyecsca.ec.mult module

class pyecsca.ec.mult.LTRMultiplier(curve, add, dbl, scl=None, ctx=None, always=False)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Classic double and add scalar multiplication algorithm, that scans the scalar left-to-right (msb to lsb)

The always parameter determines whether the double and add always method is used.

multiply(scalar, point=None)[source]
Return type:Point
class pyecsca.ec.mult.RTLMultiplier(curve, add, dbl, scl=None, ctx=None, always=False)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Classic double and add scalar multiplication algorithm, that scans the scalar right-to-left (lsb to msb)

The always parameter determines whether the double and add always method is used.

multiply(scalar, point=None)[source]
Return type:Point
class pyecsca.ec.mult.LadderMultiplier(curve, ladd, dbl, scl=None, ctx=None)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Montgomery ladder multiplier, using a three input, two output ladder formula.

multiply(scalar, point=None)[source]
Return type:Point
class pyecsca.ec.mult.SimpleLadderMultiplier(curve, add, dbl, scl=None, ctx=None)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Montgomery ladder multiplier, using addition and doubling formulas.

multiply(scalar, point=None)[source]
Return type:Point
class pyecsca.ec.mult.BinaryNAFMultiplier(curve, add, dbl, neg, scl=None, ctx=None)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Binary NAF (Non Adjacent Form) multiplier, left-to-right.

init(point)[source]
multiply(scalar, point=None)[source]
Return type:Point
class pyecsca.ec.mult.WindowNAFMultiplier(curve, add, dbl, neg, width, scl=None, ctx=None, precompute_negation=False)[source]

Bases: pyecsca.ec.mult.ScalarMultiplier

Window NAF (Non Adjacent Form) multiplier, left-to-right.

init(point)[source]
multiply(scalar, point=None)[source]