pyecsca.ec.point module¶
Provides a Point
class and a special InfinityPoint
class for the point at infinity.
- class 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
[source]¶
-
model_to:
CoordinateModel
[source]¶
-
model_from:
- class Point(model, **coords)[source]¶
Bases:
object
A point with coordinates in a coordinate model.
-
coordinate_model:
CoordinateModel
[source]¶
- 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 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
[source]¶