blob: d3b7f4e225737429eb709aa3850b63bab0f6cc51 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
name Montgomery curves
parameter a
parameter b
coordinate x
coordinate y
satisfying b*y^2 == x^3 + a*x^2 + x
ysquared (x^3+a*x^2+x)/b
addition x = b*(y2-y1)^2/(x2-x1)^2-a-x1-x2
addition y = (2*x1+x2+a)*(y2-y1)/(x2-x1)-b*(y2-y1)^3/(x2-x1)^3-y1
doubling x = b*(3*x1^2+2*a*x1+1)^2/(2*b*y1)^2-a-x1-x1
doubling y = (2*x1+x1+a)*(3*x1^2+2*a*x1+1)/(2*b*y1)-b*(3*x1^2+2*a*x1+1)^3/(2*b*y1)^3-y1
negation x = x1
negation y = -y1
toweierstrass weierx = x
toweierstrass weiery = y
a0 = b
a1 = 0
a2 = a
a3 = 0
a4 = 1
a6 = 0
fromweierstrass x = weierx
fromweierstrass y = weiery
|