pyecsca.ec.coordinates module¶
Provides a coordinate model class.
- class CoordinateModel[source]¶
Bases:
object
A coordinate system for a particular model(form) of an elliptic curve.
>>> from pyecsca.ec.params import get_params >>> params = get_params("secg", "secp256r1", "projective") >>> coordinate_model = params.curve.coordinate_model >>> coordinate_model EFDCoordinateModel("projective", curve_model=ShortWeierstrass) >>> coordinate_model.variables ['X', 'Y', 'Z'] >>> coordinate_model.curve_model ShortWeierstrassModel() >>> sorted(coordinate_model.formulas.items()) [('add-1998-cmo', AdditionEFDFormula(add-1998-cmo for shortw/projective)), ('add-1998-cmo-2', AdditionEFDFormula(add-1998-cmo-2 for shortw/projective)), ... ('dbl-2007-bl', DoublingEFDFormula(dbl-2007-bl for shortw/projective)), ...]
-
satisfying:
List
[Module
][source]¶ Relationship between the coordinate system and affine coordinates.
-
assumptions:
List
[Module
][source]¶ Assumptions that need to hold for the curve to use this coordinate system, also used to compute the values of the coordinate system parameters.
-
satisfying:
- class AffineCoordinateModel(curve_model)[source]¶
Bases:
CoordinateModel
An affine coordinate model (there is really only one per curve model).
-
satisfying:
List
[Module
][source]¶ Relationship between the coordinate system and affine coordinates.
-
assumptions:
List
[Module
][source]¶ Assumptions that need to hold for the curve to use this coordinate system, also used to compute the values of the coordinate system parameters.
-
satisfying: