Ed25519's group law, by transport from Curve25519 #
Transports Mathlib's group on NIKE.X25519.Point across the birational map
ψ : Curve25519 → Edwards, (u, v) ↦ (x, y) = (-c·u/v, (u-1)/(u+1)), c² = -486664,
and proves ψ (P + Q) = Ed25519Math.add (ψ P) (ψ Q) for all P Q, including the identity and
the order-2 point T = (0,0), which ψ sends to (0,-1).
@[reducible, inline]
Instances For
@[reducible, inline]
abbrev
Cryptlib.Primitives.Sign.Ed25519Group.curve :
WeierstrassCurve.Affine (ZMod NIKE.X25519Common.p)
Instances For
The map Curve25519 → Edwards. Sends infinity to the identity and (0,0) to (0,-1).
Equations
- Cryptlib.Primitives.Sign.Ed25519Group.psi WeierstrassCurve.Affine.Point.zero = { x := 0, y := 1 }
- Cryptlib.Primitives.Sign.Ed25519Group.psi (WeierstrassCurve.Affine.Point.some u v h) = { x := -Cryptlib.Primitives.Sign.Ed25519Facts.c * u / v, y := (u - 1) / (u + 1) }
Instances For
theorem
Cryptlib.Primitives.Sign.Ed25519Group.psi_some
{u v : Ed25519Facts.F}
(h : curve.Nonsingular u v)
:
The order-2 point (0, 0).
Equations
- Cryptlib.Primitives.Sign.Ed25519Group.T = WeierstrassCurve.Affine.Point.some 0 0 Cryptlib.Primitives.Sign.Ed25519Group.T._proof_1
Instances For
theorem
Cryptlib.Primitives.Sign.Ed25519Group.some_congr
{x x' y y' : Ed25519Facts.F}
{h : curve.Nonsingular x y}
{h' : curve.Nonsingular x' y'}
(hx : x = x')
(hy : y = y')
:
u-coordinate of P + Q for u₁ ≠ u₂.
Equations
Instances For
v-coordinate of P + Q for u₁ ≠ u₂.
Equations
- Cryptlib.Primitives.Sign.Ed25519Group.V3 u1 u2 v1 v2 = -((v1 - v2) / (u1 - u2) * (Cryptlib.Primitives.Sign.Ed25519Group.U3 u1 u2 v1 v2 - u1) + v1)
Instances For
theorem
Cryptlib.Primitives.Sign.Ed25519Group.add_X_ne_eq
{u1 v1 u2 v2 : Ed25519Facts.F}
(h1 : curve.Nonsingular u1 v1)
(h2 : curve.Nonsingular u2 v2)
(hne : u1 ≠ u2)
:
u-coordinate of 2P.
Equations
Instances For
v-coordinate of 2P.
Equations
Instances For
theorem
Cryptlib.Primitives.Sign.Ed25519Group.add_double_eq
{u v : Ed25519Facts.F}
(h : curve.Nonsingular u v)
(hv : v ≠ 0)
:
theorem
Cryptlib.Primitives.Sign.Ed25519Group.eq_T_of_v_zero
{u v : Ed25519Facts.F}
(h : curve.Nonsingular u v)
(hv0 : v = 0)
:
theorem
Cryptlib.Primitives.Sign.Ed25519Group.psi_add_gen
{u1 v1 u2 v2 : Ed25519Facts.F}
(h1 : curve.Nonsingular u1 v1)
(h2 : curve.Nonsingular u2 v2)
(hne : u1 ≠ u2)
(hv1' : v1 ≠ 0)
(hv2' : v2 ≠ 0)
(hV : V3 u1 u2 v1 v2 ≠ 0)
:
Generic addition of two points with u₁ ≠ u₂, neither of order 2, sum not of order 2.
theorem
Cryptlib.Primitives.Sign.Ed25519Group.psi_add_dbl
{u v : Ed25519Facts.F}
(h : curve.Nonsingular u v)
(hv' : v ≠ 0)
(hV : V3d u v ≠ 0)
:
Doubling a point not of order 2, when 2P is not of order 2.
ψ is a homomorphism.