pyecsca.ec.point module¶
Provides a Point
class and a special InfinityPoint
class for the point at infinity.
- class pyecsca.ec.point.CoordinateMappingAction(model_from, model_to, point)[source]¶
Bases:
ResultAction
A mapping of a point from one coordinate system to another one, usually one is an affine one.
-
model_from:
CoordinateModel
¶
-
model_to:
CoordinateModel
¶
- point: Point¶
- exit(result)¶
- property result: Any¶
- inside: bool¶
-
model_from:
- class pyecsca.ec.point.Point(model, **coords)[source]¶
Bases:
object
A point with coordinates in a coordinate model.
-
coordinate_model:
CoordinateModel
¶
-
field:
int
¶
- to_model(coordinate_model, curve, randomized=False)[source]¶
Convert an affine point into a given coordinate model, if possible.
- Return type:
- equals_affine(other)[source]¶
Test whether this point is equal to
other
irrespective of the coordinate model (in the affine sense).- Return type:
bool
-
coordinate_model:
- class pyecsca.ec.point.InfinityPoint(model)[source]¶
Bases:
Point
A point at infinity.
- to_model(coordinate_model, curve, randomized=False)[source]¶
Convert an affine point into a given coordinate model, if possible.
- Return type:
- equals_affine(other)[source]¶
Test whether this point is equal to
other
irrespective of the coordinate model (in the affine sense).- Return type:
bool
- equals_scaled(other)[source]¶
Test whether this point is equal to
other
using the “z” scaling formula.The “z” scaling formula maps the projective class to a single representative.
- equals(other)[source]¶
Test whether this point is equal to other irrespective of the coordinate model (in the affine sense).
- Return type:
bool
-
coordinate_model:
CoordinateModel
¶
-
field:
int
¶