Applied Cryptography, Second Edition: Protocols, Algorthms, and Source Code in C (cloth)
(Publisher: John Wiley & Sons, Inc.)
Author(s): Bruce Schneier
ISBN: 0471128457
Publication Date: 01/01/96

See  for a good introduction to these different factoring algorithms, except for the NFS. The best discussion of the NFS is . Other, older references are [505, 1602, 1258]. Information on parallel factoring can be found in .

If n is the number being factored, the fastest QS variants have a heuristic asymptotic run time of:

e(1+ 0(1))(ln (n))(1/2)(ln (ln (n)))(1/2)

The NFS is much faster, with a heuristic asymptotic time estimate of:

e(1.923+ 0(1))(ln (n))(1/3)(ln (ln (n)))(2/3)

In 1970, the big news was the factoring of a 41-digit hard number . (A “hard” number is one that does not have any small factors and is not of a special form that allows it to be factored more easily.) Ten years later, factoring hard numbers twice that size took a Cray computer just a few hours .

In 1988, Carl Pomerance designed a modular factoring machine, using custom VLSI chips . The size of the number you would be able to factor depends on how large a machine you can afford to build. He never built it.

In 1993, a 120-digit hard number was factored using the quadratic sieve; the calculation took 825 mips-years and was completed in three months real time . Other results are .

Today’s factoring attempts use computer networks [302, 955]. In factoring a 116-digit number, Arjen Lenstra and Mark Manasse used 400 mips-years—the spare time on an array of computers around the world for a few months.

In March 1994, a 129-digit (428-bit) number was factored using the double large prime variation of the multiple polynomial QS  by a team of mathematicians led by Lenstra. Volunteers on the Internet carried out the computation: 600 people and 1600 machines over the course of eight months, probably the largest ad hoc multiprocessor ever assembled. The calculation was the equivalent of 4000 to 6000 mips-years. The machines communicated via electronic mail, sending their individual results to a central repository where the final steps of analysis took place. This computation used the QS and five-year-old theory; it would have taken one-tenth the time using the NFS . According to : “We conclude that commonly used 512-bit RSA moduli are vulnerable to any organization prepared to spend a few million dollars and to wait a few months.” They estimate that factoring a 512-bit number would be 100 times harder using the same technology, and only 10 times harder using the NFS and current technology .

To keep up on the state of the art of factoring, RSA Data Security, Inc. set up the RSA Factoring Challenge in March 1991 . The challenge consists of a list of hard numbers, each the product of two primes of roughly equal size. Each prime was chosen to be congruent to 2 modulo 3. There are 42 numbers in the challenge, one each of length 100 digits through 500 digits in steps of 10 digits (plus one additional number, 129 digits long). At the time of writing, RSA-100, RSA-110, RSA-120, and RSA-129 have been factored, all using the QS. RSA-130 might be next (using the NFS), or the factoring champions might skip directly to RSA-140.

This is a fast-moving field. It is difficult to extrapolate factoring technology because no one can predict advances in mathematical theory. Before the NFS was discovered, many people conjectured that the QS was asymptotically as fast as any factoring method could be. They were wrong.

Near-term advances in the NFS are likely to come in the form of bringing down the constant: 1.923. Some numbers of a special form, like Fermat numbers, have a constant more along the lines of 1.5 [955, 954]. If the hard numbers used in public-key cryptography had that kind of constant, 1024-bit numbers could be factored today. One way to lower the constant is to find better ways of representing numbers as polynomials with small coefficients. The problem hasn’t been studied very extensively yet, but it is probable that advances are coming .

For the most current results from the RSA Factoring Challenge, send e-mail to challenge-info@rsa.com.

Square Roots Modulo n

If n is the product of two primes, then the ability to calculate square roots mod n is computationally equivalent to the ability to factor n [1283, 35, 36, 193]. In other words, someone who knows the prime factors of n can easily compute the square roots of a number mod n, but for everyone else the computation has been proven to be as hard as computing the prime factors of n.

### 11.5 Prime Number Generation

Public-key algorithms need prime numbers. Any reasonably sized network needs lots of them. Before discussing the mathematics of prime number generation, I will answer a few obvious questions.

1.  If everyone needs a different prime number, won’t we run out? No. In fact, there are approximately 10151 primes 512 bits in length or less. For numbers near n, the probability that a random number is prime is approximately one in ln n. So the total number of primes less than n is n /(ln n). There are only 1077 atoms in the universe. If every atom in the universe needed a billion new primes every microsecond from the beginning of time until now, you would only need 10109 primes; there would still be approximately 10151 512-bit primes left.
2.  What if two people accidentally pick the same prime number? It won’t happen. With over 10151 prime numbers to choose from, the odds of that happening are significantly less than the odds of your computer spontaneously combusting at the exact moment you win the lottery.
3.  If someone creates a database of all primes, won’t he be able to use that database to break public-key algorithms? Yes, but he can’t do it. If you could store one gigabyte of information on a drive weighing one gram, then a list of just the 512-bit primes would weigh so much that it would exceed the Chandrasekhar limit and collapse into a black hole...so you couldn’t retrieve the data anyway.

But if factoring numbers is so hard, how can generating prime numbers be easy? The trick is that the yes/no question, “Is n prime?” is a much easier question to answer than the more complicated question, “What are the factors of n?

[an error occurred while processing this directive]
{"ft_lang_label":"__label__en","ft_lang_prob":0.9417962,"math_prob":0.9644239,"size":4829,"snap":"2019-35-2019-39","text_gpt3_token_len":1095,"char_repetition_ratio":0.13119172,"word_repetition_ratio":0.004895961,"special_character_ratio":0.24518535,"punctuation_ratio":0.10598111,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98891217,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-09-21T00:23:16Z\",\"WARC-Record-ID\":\"<urn:uuid:143a11d2-598c-475d-8216-165bf4d09ae4>\",\"Content-Length\":\"8936\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8c6e6d06-66fc-4be8-83d9-cb16416d6509>\",\"WARC-Concurrent-To\":\"<urn:uuid:c2224890-261d-4eb3-864c-a696f9c4235a>\",\"WARC-IP-Address\":\"188.65.220.25\",\"WARC-Target-URI\":\"http://www.foo.be/docs-free/applied-cryptography/ch11/11-11.html\",\"WARC-Payload-Digest\":\"sha1:SAYOA526GLMSOZF6PS3X3Y7YXAUHX5T7\",\"WARC-Block-Digest\":\"sha1:3NZGZQFJ4H2J65K5JHCKT72MLBULR5OZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-39/CC-MAIN-2019-39_segments_1568514574159.19_warc_CC-MAIN-20190921001810-20190921023810-00544.warc.gz\"}"}