Montgomery curve
{{Too technical|date=February 2025}}
{{Short description|Type of elliptic curve}}
In mathematics, the Montgomery curve is a form of elliptic curve introduced by Peter L. Montgomery in 1987,{{cite journal
| author = Peter L. Montgomery
| year = 1987
| title = Speeding the Pollard and Elliptic Curve Methods of Factorization
| journal = Mathematics of Computation |volume=48 |issue=177 |pages=243–264
| jstor = 2007888
| doi=10.2307/2007888
| doi-access = free
}} different from the usual Weierstrass form. It is used for certain computations, and in particular in different cryptography applications.
Definition
A Montgomery curve over a field {{math|K}} is defined by the equation
:
for certain {{math|A, B ∈ K}} and with {{math|B(A2 − 4) ≠ 0}}.
Generally this curve is considered over a finite field K (for example, over a finite field of {{math|q}} elements, {{math|1=K = Fq}}) with characteristic different from 2 and with {{math|A ≠ ±2}} and {{math|B ≠ 0}}, but they are also considered over the rationals with the same restrictions for {{math|A}} and {{math|B}}.
Montgomery arithmetic
It is possible to do some "operations" between the points of an elliptic curve: "adding" two points consists of finding a third one such that ; "doubling" a point consists of computing (For more information about operations see The group law) and below.
A point on the elliptic curve in the Montgomery form can be represented in Montgomery coordinates , where are projective coordinates and for .
Notice that this kind of representation for a point loses information: indeed, in this case, there is no distinction between the affine points and because they are both given by the point . However, with this representation it is possible to obtain multiples of points, that is, given , to compute .
Now, considering the two points and : their sum is given by the point whose coordinates are:
:
X_{m+n} = Z_{m-n}((X_m-Z_m)(X_n+Z_n)+(X_m+Z_m)(X_n-Z_n))^2
:
Z_{m+n} = X_{m-n}((X_m-Z_m)(X_n+Z_n)-(X_m+Z_m)(X_n-Z_n))^2
If , then the operation becomes a "doubling"; the coordinates of are given by the following equations:
:
4X_nZ_n = (X_n+Z_n)^2 - (X_n-Z_n)^2
:
X_{2n} = (X_n+Z_n)^2(X_n-Z_n)^2
:
Z_{2n} = (4X_nZ_n)((X_n-Z_n)^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 , so can be chosen in order to have a small D.
Algorithm and example
The following algorithm represents a doubling of a point on an elliptic curve in the Montgomery form.
It is assumed that . The cost of this implementation is 1M + 2S + 1*A + 3add + 1*4. Here M denotes the multiplications required, S indicates the squarings, and a refers to the multiplication by A.
:
:
:
=Example=
Let be a point on the curve .
In coordinates , with , .
Then:
:
:
:
The result is the point such that .
Addition
Given two points , on the Montgomery curve in affine coordinates, the point represents, geometrically the third point of intersection between and the line passing through and . It is possible to find the coordinates of , in the following way:
1) consider a generic line in the affine plane and let it pass through and (impose the condition), in this way, one obtains and ;
2) intersect the line with the curve , substituting the variable in the curve equation with ; the following equation of third degree is obtained:
:
As it has been observed before, this equation has three solutions that correspond to the coordinates of , and . In particular this equation can be re-written as:
:
3) Comparing the coefficients of the two identical equations given above, in particular the coefficients of the terms of second degree, one gets:
: .
So, can be written in terms of , , , , as:
:
4) To find the coordinate of the point it is sufficient to substitute the value in the line . Notice that this will not give the point directly. Indeed, with this method one find the coordinates of the point such that , but if one needs the resulting point of the sum between and , then it is necessary to observe that: if and only if . So, given the point , it is necessary to find , but this can be done easily by changing the sign to the coordinate of . In other words, it will be necessary to change the sign of the coordinate obtained by substituting the value in the equation of the line.
Resuming, the coordinates of the point , are:
:
:
Doubling
Given a point on the Montgomery curve , the point represents geometrically the third point of intersection between the curve and the line tangent to ; so, to find the coordinates of the point it is sufficient to follow the same method given in the addition formula; however, in this case, the line y = lx + m has to be tangent to the curve at , so, if with
:
then the value of l, which represents the slope of the line, is given by:
:
by the implicit function theorem.
So and the coordinates of the point , are:
:
\begin{align}
x_3 & = Bl^2-A-x_1-x_1 = \frac{B(3x_1^2+2Ax_1+1)^2}{(2By_1)^2}-A-x_1-x_1 \\
y_3 & = (2x_1+x_1+A)l-Bl^3-y_1 \\
& = \frac{(2x_1+x_1+A)(3{x_1}^2+2Ax_1+1)}{2By_1}-\frac{B(3{x_1}^2+2Ax_1+1)^3}{(2By_1)^3}-y_1.
\end{align}
Equivalence with twisted Edwards curves
Let be a field with characteristic different from 2.
Let be an elliptic curve in the Montgomery form:
:
with ,
and let be an elliptic curve in the twisted Edwards form:
:
with
The following theorem shows the birational equivalence between Montgomery curves and twisted Edwards curve:{{cite book
| author = Daniel J. Bernstein, Peter Birkner, Marc Joye, Tanja Lange and Christiane Peters
| title = Progress in Cryptology – AFRICACRYPT 2008
| volume = 5023
| pages = 389–405
| year = 2008
| publisher = Springer-Verlag Berlin Heidelberg
| isbn = 978-3-540-68159-5
| doi = 10.1007/978-3-540-68164-9_26
| series = Lecture Notes in Computer Science
| chapter = Twisted Edwards Curves
| chapter-url = http://eprint.iacr.org/2008/013
}}
Theorem (i) Every twisted Edwards curve is birationally equivalent to a Montgomery curve over .
In particular, the twisted Edwards curve is birationally equivalent to the Montgomery curve where , and .
The map:
:
:
(x,y) \mapsto (u,v) = \left(\frac{1+y}{1-y},\frac{1+y}{(1-y)x}\right)
is a birational equivalence from to , with inverse:
: :
:
(u,v) \mapsto (x,y) = \left(\frac{u}{v},\frac{u-1}{u+1}\right),
a=\frac{A+2}{B}, d=\frac{A-2}{B}
Notice that this equivalence between the two curves is not valid everywhere: indeed the map is not defined at the points or of the .
Equivalence with Weierstrass curves
Any elliptic curve can be written in Weierstrass form. In particular, the elliptic curve in the Montgomery form
: :
can be transformed in the following way:
divide each term of the equation for by , and substitute the variables x and y, with and respectively, to get the equation
:
To obtain a short Weierstrass form from here, it is sufficient to replace u with the variable :
:
finally, this gives the equation:
:
Hence the mapping is given as
: :
:
(x,y) \mapsto (t,v) = \left(\frac{x}{B} + \frac{A}{3B}, \frac{y}{B}\right),
a=\frac{3-A^2}{3B^2}, b=\frac{2A^3-9A}{27B^3}
In contrast, an elliptic curve over base field in Weierstrass form
: :
can be converted to Montgomery form if and only if has order divisible by four and satisfies the following conditions:{{cite conference
| author = Katsuyuki Okeya, Hiroyuki Kurumatani, and Kouichi Sakurai
| year = 2000
| title = Elliptic Curves with the Montgomery-Form and Their Cryptographic Applications
| conference = Public Key Cryptography (PKC2000)
| doi = 10.1007/978-3-540-46588-1_17
| doi-access = free
}}
- has at least one root ; and
- is a quadratic residue in .
When these conditions are satisfied, then for we have the mapping
: :
:
(t,v) \mapsto (x,y) =
\left(s (t-\alpha), s v\right),
A = 3 \alpha s,
B = s
.
See also
- Curve25519
- Table of costs of operations in elliptic curves – information about the running-time required in a specific case
Notes
{{reflist}}
References
- {{cite journal
| author = Peter L. Montgomery
| year = 1987
| title = Speeding the Pollard and Elliptic Curve Methods of Factorization
| journal = Mathematics of Computation |volume=48 |issue=177 |pages=243–264
| jstor = 2007888
| doi=10.2307/2007888
| doi-access = free
}}
- {{cite book
| author = Daniel J. Bernstein, Peter Birkner, Marc Joye, Tanja Lange and Christiane Peters
| title = Progress in Cryptology – AFRICACRYPT 2008
| volume = 5023
| pages = 389–405
| year = 2008
| publisher = Springer-Verlag Berlin Heidelberg
| isbn = 978-3-540-68159-5
| doi = 10.1007/978-3-540-68164-9_26
| series = Lecture Notes in Computer Science
| chapter = Twisted Edwards Curves
| chapter-url = http://eprint.iacr.org/2008/013
}}
- {{cite journal
|author1=Wouter Castryck |author2=Steven Galbraith |author3=Reza Rezaeian Farashahi |year=2008
| title = Efficient Arithmetic on Elliptic Curves using a Mixed Edwards-Montgomery Representation
| url = https://eprint.iacr.org/2008/218.pdf
}}
External links
- [http://hyperelliptic.org/EFD/g1p/index.html Genus-1 curves over large-characteristic fields]