:mod:`klefki.curves` ==================== .. py:module:: klefki.curves Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 bns/index.rst Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 arith/index.rst baby_jubjub/index.rst bls12_381/index.rst secp256k1/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: klefki.curves.EllipticCurveBabyJubjub klefki.curves.ECGBN128 klefki.curves.ECGBLS12_381 klefki.curves.EllipticCurveGroupSecp256k1 .. py:class:: EllipticCurveBabyJubjub(*args) Bases: :class:`klefki.algebra.groups.EllipticCurveGroup` Twisted Edwards Form (standard) y^2 = x^3 + Ax^2 + x Montgomery Form By^2 = x^3 + A x^2 + x .. attribute:: A .. attribute:: B .. attribute:: N .. method:: op(self, g) The Operator for obeying axiom `associativity` (2) .. py:class:: ECGBN128(*args) Bases: :class:`klefki.algebra.groups.ecg.PairFriendlyEllipticCurveGroup` y^2 = x^3 + A * x + B .. attribute:: A .. attribute:: N .. attribute:: F .. method:: op(self, g) The Operator for obeying axiom `associativity` (2) .. method:: twist(self) .. method:: twist_FP_to_FP12(cls, x, y) :classmethod: .. method:: twist_FP2_to_FP12(cls, x, y) :classmethod: .. method:: linefunc(P1, P2, T) :staticmethod: .. method:: miller_loop(cls, Q, P) :classmethod: .. method:: pairing(cls, P, Q) :classmethod: e(P, Q + R) = e(P, Qj * e(P, R) e(P + Q, R) = e(P, R) * e(Q, R) .. method:: is_on_curve(self) .. method:: B(F=BN128FP) :staticmethod: .. method:: lift_x(cls, x) :classmethod: .. py:class:: ECGBLS12_381(*args) Bases: :class:`klefki.algebra.groups.ecg.PairFriendlyEllipticCurveGroup` y**2 = x**3 + 4 .. attribute:: A .. attribute:: N .. attribute:: F .. method:: op(self, g) The Operator for obeying axiom `associativity` (2) .. method:: twist(self) .. method:: twist_FP_to_FP12(cls, x, y) :classmethod: .. method:: twist_FP2_to_FP12(cls, x, y) :classmethod: .. method:: linefunc(P1, P2, T) :staticmethod: .. method:: miller_loop(cls, Q, P) :classmethod: .. method:: pairing(cls, P, Q) :classmethod: e(P, Q + R) = e(P, Qj * e(P, R) e(P + Q, R) = e(P, R) * e(Q, R) .. method:: is_on_curve(self) .. method:: B(F=BLS12_381FP) :staticmethod: .. method:: lift_x(cls, x) :classmethod: .. py:class:: EllipticCurveGroupSecp256k1(*args) Bases: :class:`klefki.algebra.groups.EllipticCurveGroup` y^2 = x^3 + A * x + B .. attribute:: N .. attribute:: A .. attribute:: B .. method:: op(self, g) The Operator for obeying axiom `associativity` (2) .. method:: lift_x(cls, x: FiniteField) :classmethod: