klefki.curves

Package Contents

Classes

EllipticCurveBabyJubjub

Twisted Edwards Form (standard)

ECGBN128

y^2 = x^3 + A * x + B

ECGBLS12_381

y**2 = x**3 + 4

EllipticCurveGroupSecp256k1

y^2 = x^3 + A * x + B

class klefki.curves.EllipticCurveBabyJubjub(*args)

Bases: 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

A
B
N
op(self, g)

The Operator for obeying axiom associativity (2)

class klefki.curves.ECGBN128(*args)

Bases: klefki.algebra.groups.ecg.PairFriendlyEllipticCurveGroup

y^2 = x^3 + A * x + B

A
N
F
op(self, g)

The Operator for obeying axiom associativity (2)

twist(self)
classmethod twist_FP_to_FP12(cls, x, y)
classmethod twist_FP2_to_FP12(cls, x, y)
static linefunc(P1, P2, T)
classmethod miller_loop(cls, Q, P)
classmethod pairing(cls, P, Q)

e(P, Q + R) = e(P, Qj * e(P, R) e(P + Q, R) = e(P, R) * e(Q, R)

is_on_curve(self)
static B(F=BN128FP)
classmethod lift_x(cls, x)
class klefki.curves.ECGBLS12_381(*args)

Bases: klefki.algebra.groups.ecg.PairFriendlyEllipticCurveGroup

y**2 = x**3 + 4

A
N
F
op(self, g)

The Operator for obeying axiom associativity (2)

twist(self)
classmethod twist_FP_to_FP12(cls, x, y)
classmethod twist_FP2_to_FP12(cls, x, y)
static linefunc(P1, P2, T)
classmethod miller_loop(cls, Q, P)
classmethod pairing(cls, P, Q)

e(P, Q + R) = e(P, Qj * e(P, R) e(P + Q, R) = e(P, R) * e(Q, R)

is_on_curve(self)
static B(F=BLS12_381FP)
classmethod lift_x(cls, x)
class klefki.curves.EllipticCurveGroupSecp256k1(*args)

Bases: klefki.algebra.groups.EllipticCurveGroup

y^2 = x^3 + A * x + B

N
A
B
op(self, g)

The Operator for obeying axiom associativity (2)

classmethod lift_x(cls, x: FiniteField)