In mathematics, the Montgomery curve is a form of elliptic curve introduced by Peter L. Montgomery in 1987,[1] different from the usual Weierstrass form. It is used for certain computations, and in particular in different cryptography applications.
A Montgomery curve over a field is defined by the equation
MA,B:By2=x3+Ax2+x
for certain and with .
Generally this curve is considered over a finite field K (for example, over a finite field of elements,) with characteristic different from 2 and with and, but they are also considered over the rationals with the same restrictions for and .
It is possible to do some "operations" between the points of an elliptic curve: "adding" two points
P,Q
R
R=P+Q
[2]P=P+P
A point
P=(x,y)
By2=x3+Ax2+x
P=(X:Z)
P=(X:Z)
x=X/Z
Z\ne0
(x,y)
(x,-y)
(X:Z)
P=(X:Z)
[n]P=(Xn:Zn)
Now, considering the two points
Pn=[n]P=(Xn:Zn)
Pm=[m]P=(Xm:Zm)
Pm+n=Pm+Pn=(Xm+n:Zm+n)
Xm+n=Zm-n((Xm-Zm)(Xn+Zn)+(Xm+Zm)(Xn-Z
2 | |
n)) |
Zm+n=Xm-n((Xm-Zm)(Xn+Zn)-(Xm+Zm)(Xn-Z
2 | |
n)) |
If
m=n
[2]Pn=Pn+Pn=P2n=(X2n:Z2n)
4XnZn=(Xn+Z
2 | |
n) |
-(Xn-Z
2 | |
n) |
X2n=(Xn+Z
2(X | |
n-Z |
2 | |
n) |
Z2n=(4XnZn)((Xn-Z
2+((A+2)/4)(4X | |
nZ |
n))
The first operation considered above (addition) has a time-cost of 3M+2S, where M denotes the multiplication between two general elements of the field on which the elliptic curve is defined, while S denotes squaring of a general element of the field.
The second operation (doubling) has a time-cost of 2M + 2S + 1D, where D denotes the multiplication of a general element by a constant; notice that the constant is
(A+2)/4
A
The following algorithm represents a doubling of a point
P1=(X1:Z1)
It is assumed that
Z1=1
XX1=
2 | |
X | |
1 |
X2=
2 | |
(XX | |
1-1) |
Z2=4X1(XX1+aX1+1)
Let
P1=(2,\sqrt{3})
2y2=x3-x2+x
(X1:Z1)
x1=X1/Z1
P1=(2:1)
Then:
XX1=
2 | |
X | |
1 |
=4
X2=
2 | |
(XX | |
1-1) |
=9
Z2=4X1(XX1+AX1+1)=24
The result is the point
P2=(X2:Z2)=(9:24)
P2=2P1
Given two points
P1=(x1,y1)
P2=(x2,y2)
MA,B
P3=P1+P2
MA,B
P1
P2
(x3,y3)
P3
1) consider a generic line
~y=lx+m
P1
P2
l= | y2-y1 |
x2-x1 |
m=y | ||||
|
\right)x1
2) intersect the line with the curve
MA,B
~y
~y=lx+m
x3+(A-Bl2)x2+(1-2Blm)x-Bm2=0.
As it has been observed before, this equation has three solutions that correspond to the
~x
P1
P2
P3
(x-x1)(x-x2)(x-x3)=0
3) Comparing the coefficients of the two identical equations given above, in particular the coefficients of the terms of second degree, one gets:
-x1-x2-x
2 | |
3=A-Bl |
So,
x3
x1
y1
x2
y2
x3=B\left(
y2-y1 | |
x2-x1 |
2-A-x | |
\right) | |
1-x |
2.
4) To find the
~y
P3
x3
~y=lx+m
P3
~R
R+P1+P2=Pinfty
P1
P2
R+P1+P2=Pinfty
-R=P1+P2
~R
~-R
~y
~R
~y
x3
Resuming, the coordinates of the point
P3=(x3,y3)
P3=P1+P2
x3=
| |||||||||||||
|
-A-x1-x2
y3=
(2x1+x2+A)(y2-y1) | - | |
x2-x1 |
| |||||||||||||
|
-y1
Given a point
P1
MA,B
[2]P1
P1
P3=2P1
P1
MA,B:f(x,y)=0
f(x,y)=x3+Ax2+x-By2,
then the value of l, which represents the slope of the line, is given by:
l=-\left. | \partialf | \right/ |
\partialx |
\partialf | |
\partialy |
by the implicit function theorem.
So
l=
| ||||||||||
2By1 |
P3
P3=2P1
\begin{align} x3&=
2-A-x | |
Bl | |
1-x |
1=
| |||||||
|
-A-x1-x1\\ y3&=(2x1+x
3-y | |
1 |
\\ &=
(2x1+x1+A)(3{x1 | |
2+2Ax |
1+1)}{2By
|
3}-y | |
1. \end{align} |
Let
K
Let
MA,B
MA,B:Bv2=u3+Au2+u
with
A\inK\smallsetminus\{-2,2\}
B\inK\smallsetminus\{0\}
and let
Ea,d
Ea,d : ax2+y2=1+dx2y2,
with
a,d\inK\smallsetminus\{0\}, a ≠ d.
The following theorem shows the birational equivalence between Montgomery curves and twisted Edwards curve:[2]
Theorem (i) Every twisted Edwards curve is birationally equivalent to a Montgomery curve over
K
Ea,d
MA,B
A=
2(a+d) | |
a-d |
B=
4 | |
a-d |
The map:
\psi:Ea,d → MA,B
(x,y)\mapsto(u,v)=\left(
1+y | , | |
1-y |
1+y | |
(1-y)x |
\right)
is a birational equivalence from
Ea,d
MA,B
\psi-1
MA,B → Ea,d
(u,v)\mapsto(x,y)=\left(
u | , | |
v |
u-1 | \right), a= | |
u+1 |
A+2 | |
B |
,d=
A-2 | |
B |
Notice that this equivalence between the two curves is not valid everywhere: indeed the map
\psi
v=0
u+1=0
MA,B
Any elliptic curve can be written in Weierstrass form. In particular, the elliptic curve in the Montgomery form
MA,B
By2=x3+Ax2+x,
can be transformed in the following way:divide each term of the equation for
MA,B
B3
u= | x |
B |
v= | y |
B |
v2=u3+
A | |
B |
u2+
1 | |
B2 |
u.
To obtain a short Weierstrass form from here, it is sufficient to replace u with the variable
t- | A |
3B |
v2=\left(t-
A | |
3B |
\right)3+
A | \left(t- | |
B |
A | |
3B |
\right)2+
1 | \left(t- | |
B2 |
A | |
3B |
\right);
finally, this gives the equation:
v2=t3+\left(
3-A2 | |
3B2 |
\right)t+\left(
2A3-9A | |
27B3 |
\right).
Hence the mapping is given as
\psi
MA,B → Ea,b
(x,y)\mapsto(t,v)=\left(
x | |
B |
+
A | |
3B |
,
y | \right), a= | |
B |
3-A2 | |
3B2 |
,b=
2A3-9A | |
27B3 |
In contrast, an elliptic curve over base field
F
Ea,b
v2=t3+at+b
can be converted to Montgomery form if and only if
Ea,b
z3+az+b=0
\alpha\inF
3\alpha2+a
F
When these conditions are satisfied, then for
s=(\sqrt{3\alpha2+a})-1
\psi-1
Ea,b → MA,B
(t,v)\mapsto(x,y)= \left(s(t-\alpha),sv\right), A=3\alphas, B=s