- Lenstra elliptic curve factorization
The Lenstra elliptic curve factorization or the elliptic curve factorization method (ECM) is a fast, sub-
exponential running time algorithm forinteger factorization which employselliptic curve s. Technically, the ECM is classified as adeterministic algorithm as all "random " steps (such as the choice of curves) used can be derandomized (using pseudo-random sources) and done in a deterministic way. (This is not to say that the algorithm can't be implemented in a probabilistic way, if one so chooses, provided one has a true source of randomness.)For general purpose factoring, ECM is the third-fastest known factoring method. The second fastest is the multiple polynomial quadratic sieve and the fastest is the
general number field sieve ; both areprobabilistic algorithms , in the sense there is no guarantee that they will return a non trivial factor in the expected running time; there is an exponentially small probability they will take an exponential amount of time.Practically speaking, ECM is considered a special purpose factoring algorithm as it is most suitable for finding small factors. Currently, it is still the best algorithm for
divisor s not greatly exceeding 20 to 25 digits (64 to 83 bits or so), as its running time is dominated by the size of the smallest factor "p" rather than by the size of the number "n" to be factored. Frequently, ECM is used to remove small factors from a very large integer with many factors; if the remaining integer is still composite, then it has only large factors and is factored using general purpose techniques. The largest factor found using ECM so far was discovered on August 24, 2006 by B. Dodson and has 67 digits [http://www.loria.fr/~zimmerma/records/top50.html] . Increasing the number of curves tested improves the chances of finding a factor, but they are notlinear with the increase in the number of digits.Lenstra's elliptic curve factorization
The Lenstra elliptic curve factorization method to find a factor of the given number "n" works as follows:
* Pick a random
elliptic curve over , given by an equation of the form "y"2 = "x"3 + "ax" + "b", and a non-trivial point "A" on it. Thegroup law on this curve is given by rational functions; divisions of residue classes modulo "n" can be performed using theEuclidean algorithm . If in the remaining part of the algorithm a non-zero element of is encountered which fails to be invertible, we get in effect a factorization of "n".* Compute "eA" in the group of ()-valued points of the elliptic curve, where "e" is product of small primes raised to small powers, as in the "p" − 1 algorithm. This can be done one prime at a time, thus efficiently.
* Hopefully, "eA" is a zero element of the elliptic curve group in Z"p" but not in Z"q", for two prime divisors "p" and "q" of "n" — as in the "p" − 1 method, it is unlikely that both groups will have an order which is a divisor of "e". Then we can find a factor of "n" by finding the
greatest common divisor of the "x"-coordinate of "eA" and "n", since this coordinate will be zero in Z"p".* If it does not work, we can try again with some other curve and starting point.
The complexity depends on the size of the factor and can be represented by O(e(1 + o(1)) √(ln "p" ln ln "p")), where "p" is the smallest factor of "n".
Derivation
ECM is at its core an improvement of the older "p" − 1 algorithm. The "p" − 1 algorithm finds prime factors "p" such that "p" − 1 is b-powersmooth for small values of "b". For any "e", a multiple of "p" − 1, and any "a"
relatively prime to "p", byFermat's little theorem we have "a""e" ≡ "1" (mod "p"). Then gcd("a""e" − 1, "n") is likely to produce a factor of "n". However, the algorithm fails when "p"-1 has large prime factors, as is the case for numbers containingstrong prime s, for example.ECM gets around this obstacle by considering the group of a random
elliptic curve over thefinite field Z"p", rather than considering themultiplicative group of Z"p" which always has order "p" − 1.The order of the group of an elliptic curve over Z"p" varies (randomly) between "p" + 1 − 2√"p" and "p" + 1 + 2√"p" by Hasse's theorem, and is likely to be smooth for some elliptic curves. Although there is no proof that a smooth group order will be found in the Hasse-interval, by using
heuristic probabilistic methods, theCanfield-Erdös-Pomerance theorem with suitably optimized parameter choices, and theL-notation , we can expect to try L[ √2 / 2, √2] curves before getting a smooth group order. This heuristic estimate is very reliable in practice.ee also
*
UBASIC for practical program (ECMX).
* [http://www.komite.net/laurent/soft/ecm/ecm-6.0.1.html GMP-ECM] , an efficient implementation of ECM.
* [http://www.loria.fr/~zimmerma/records/ecmnet.html ECMNet] , an easy client-server implementation that works with several factorization projects.
* [http://www.sourceforge.net/projects/pyecm pyecm] , a python implementation of ECM. Much faster with psyco and/or gmpy.Other external links
* [http://alpertron.com.ar/ECM.htm Factoring applet that uses ECM]
References
* Brent, Richard P. "Factorization of the tenth Fermat number." "Mathematics of Computation" 68 (1999), 429-451.
* Cohen, Henri. "A Course in Computational Algebraic Number Theory." Springer-Verlag, New York, Berlin, Heidelberg, 1996. ISBN 0-387-55640-0.
* Lenstra, A. K. and Lenstra Jr., H. W. (editors), "The development of the number field sieve." Lecture Notes in Mathematics 1554, Springer-Verlag, Berlin, 1993. MR 96m:11116.
* Lenstra Jr., H. W. "Factoring integers with elliptic curves." "Annals of Mathematics" (2) 126 (1987), 649-673. MR 89g:11125.
* cite book
last = Pomerance
first = Carl
authorlink = Carl Pomerance
coauthors = Richard Crandall
year = 2001
title = Prime Numbers: A Computational Perspective
publisher = Springer
edition = 1st edition
chapter = Section 7.4: Elliptic curve method
pages = 301–313
id = ISBN 0-387-94777-9* Pomerance, Carl. "The quadratic sieve factoring algorithm." "Advances in Cryptology, Proc. Eurocrypt '84", Lecture Notes in Computer Science, Vol. 209, Springer-Verlag, Berlin, 1985, 169-182. MR 87d:11098.
* cite journal
last=Pomerance
first=Carl
title=A Tale of Two Sieves
journal=Notices of the American Mathematical Society
pages=1473–1485
volume=43
date=1996
issue=12
url=http://www.ams.org/notices/199612/pomerance.pdf
format =PDF * Silverman, Robert D. "The Multiple Polynomial Quadratic Sieve." "Mathematics of Computation" 48 (1987), 329-339.
Wikimedia Foundation. 2010.