klefki.curves.arith

Module Contents

Functions

short_weierstrass_form_curve_addition(u1, v1, u2, v2, a1, a3, a2, a4, a6, f: FiniteField) → (FiniteField, FiniteField)

https://core.ac.uk/download/pdf/10898289.pdf

short_weierstrass_form_curve_twist_addition(u1, v1, u2, v2, a1, a3, a2, a4, a6, f: FiniteField, d)

klefki.curves.arith.short_weierstrass_form_curve_addition(u1, v1, u2, v2, a1, a3, a2, a4, a6, f: FiniteField)

https://core.ac.uk/download/pdf/10898289.pdf E_{W,a1a3a2a4a6} = v^2 + a1uv + a3v = u^3 + a2u^2 + a4u + a6 for k256 curve: v^2 = u^3 + a * u + b a1,a3,a2,a4,a6 = 0, 0, 0, a, b for baby_jubjub curve: Bv^2 = x^3 + Ax^2 + x a1,a3,a2,a4,a6 = 0, 0, a, 1, 0

klefki.curves.arith.short_weierstrass_form_curve_twist_addition(u1, v1, u2, v2, a1, a3, a2, a4, a6, f: FiniteField, d)