pyecsca.ec.mult.fixed module¶
Provides fixed-base scalar multipliers that do a lot of pre-computation (but not combs).
- class FullPrecompMultiplier(add, dbl, scl=None, always=False, direction=ProcessingDirection.LTR, accumulation_order=AccumulationOrder.PeqPR, complete=True, short_circuit=True)[source]¶
Bases:
AccumulatorMultiplier
,ScalarMultiplier
See page 104 of [GECC]:
For example, if the points [2]P,[2^2]P,…,[2^t−1]P are precomputed, then the right-to-left binary method (Algorithm 3.26) has expected running time (m/2)A (all doublings are eliminated).
- Parameters:
always¶ (
bool
) – Whether the addition is always performed.direction¶ (
ProcessingDirection
) – Whether it is LTR or RTL.accumulation_order¶ (
AccumulationOrder
) – The order of accumulation of points.complete¶ (
bool
) – Whether it starts processing at full order-bit-length.
- requires: ClassVar[Set[Type]] = {<class 'pyecsca.ec.formula.base.AdditionFormula'>, <class 'pyecsca.ec.formula.base.DoublingFormula'>}[source]¶
The set of formula types that the multiplier requires.
- optionals: ClassVar[Set[Type]] = {<class 'pyecsca.ec.formula.base.ScalingFormula'>}[source]¶
The optional set of formula types that the multiplier can use.
-
direction:
ProcessingDirection
[source]¶ Whether it is LTR or RTL.
- short_circuit: bool[source]¶
Whether the formulas will short-circuit upon input of the point at infinity.
- init(params, point)[source]¶
Initialize the scalar multiplier with
params
and apoint
.Warning
The point is not verified to be on the curve represented in the domain parameters.
- Parameters:
params¶ (
DomainParameters
) – The domain parameters to initialize the multiplier with.point¶ (
Point
) – The point to initialize the multiplier with.