pyecsca.ec.model module

Provides curve model classes for the supported curve models.

class CurveModel[source]

Bases: object

Model(form) of an elliptic curve.

name: str[source]
shortname: str[source]
coordinates: MutableMapping[str, CoordinateModel][source]
parameter_names: List[str][source]
coordinate_names: List[str][source]
equation: Expression[source]
ysquared: Expression[source]
base_addition: List[Module][source]
base_doubling: List[Module][source]
base_negation: List[Module][source]
base_neutral: List[Module][source]
full_weierstrass: List[Module][source]
to_weierstrass: List[Module][source]
from_weierstrass: List[Module][source]
class ShortWeierstrassModel[source]

Bases: EFDCurveModel

Short-Weierstrass curve model.

\[y^2 = x^3 + a x + b\]
name: str[source]
shortname: str[source]
coordinates: MutableMapping[str, CoordinateModel][source]
parameter_names: List[str][source]
coordinate_names: List[str][source]
equation: Expression[source]
ysquared: Expression[source]
base_addition: List[Module][source]
base_doubling: List[Module][source]
base_negation: List[Module][source]
base_neutral: List[Module][source]
full_weierstrass: List[Module][source]
to_weierstrass: List[Module][source]
from_weierstrass: List[Module][source]
class MontgomeryModel[source]

Bases: EFDCurveModel

Montgomery curve model.

\[B y^2 = x^3 + A x^2 + x\]
name: str[source]
shortname: str[source]
coordinates: MutableMapping[str, CoordinateModel][source]
parameter_names: List[str][source]
coordinate_names: List[str][source]
equation: Expression[source]
ysquared: Expression[source]
base_addition: List[Module][source]
base_doubling: List[Module][source]
base_negation: List[Module][source]
base_neutral: List[Module][source]
full_weierstrass: List[Module][source]
to_weierstrass: List[Module][source]
from_weierstrass: List[Module][source]
class EdwardsModel[source]

Bases: EFDCurveModel

Edwards curve model.

\[x^2 + y^2 = c^2 (1 + d x^2 y^2)\]
name: str[source]
shortname: str[source]
coordinates: MutableMapping[str, CoordinateModel][source]
parameter_names: List[str][source]
coordinate_names: List[str][source]
equation: Expression[source]
ysquared: Expression[source]
base_addition: List[Module][source]
base_doubling: List[Module][source]
base_negation: List[Module][source]
base_neutral: List[Module][source]
full_weierstrass: List[Module][source]
to_weierstrass: List[Module][source]
from_weierstrass: List[Module][source]
class TwistedEdwardsModel[source]

Bases: EFDCurveModel

Twisted-Edwards curve model.

\[a x^2 + y^2 = 1 + d x^2 y^2\]
name: str[source]
shortname: str[source]
coordinates: MutableMapping[str, CoordinateModel][source]
parameter_names: List[str][source]
coordinate_names: List[str][source]
equation: Expression[source]
ysquared: Expression[source]
base_addition: List[Module][source]
base_doubling: List[Module][source]
base_negation: List[Module][source]
base_neutral: List[Module][source]
full_weierstrass: List[Module][source]
to_weierstrass: List[Module][source]
from_weierstrass: List[Module][source]