Skip to main content

Module point_edwards

Module point_edwards 

Source
Expand description

Point representation and group law for Edwards curves.

A single EdwardsPoint<F> type handles both odd and even characteristic via runtime dispatch on $F::characteristic()$.

§Odd characteristic

The curve is given by

$$ x^2 + y^2 = 1 + d x^2 y^2 $$

  • Identity: $(0, 1)$
  • Negation: $-(x, y) = (-x, y)$
  • Addition:

$$ x_3 = \frac{x_1 y_2 + y_1 x_2}{1 + d x_1 x_2 y_1 y_2}, \quad y_3 = \frac{y_1 y_2 - x_1 x_2}{1 - d x_1 x_2 y_1 y_2} $$

§Characteristic $2$

The curve is given by

$$ d_1(x + y) + d_2(x^2 + y^2) = xy + xy(x + y) + x^2 y^2 $$

  • Identity: $(0, 0)$
  • Negation: $-(x, y) = (y, x)$
  • Addition: Bernstein–Lange–Rezaeian Farashahi §3 formulas (strongly unified — works for doubling too)

Structs§

EdwardsPoint
An affine point on an Edwards curve, for any characteristic.