home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz KrOnIcKLeZ 3 / HaCKeRz_KrOnIcKLeZ.iso / chibacity / factor.txt < prev    next >
Internet Message Format  |  1996-04-23  |  12KB

  1. From owner-cypherpunks@toad.com  Sun Feb 12 18:49:24 1995
  2. From: schneier@chinet.chinet.com
  3. Subject: Factoring - State of the Art and Predictions
  4. To: cypherpunks@toad.com
  5. Date: Sun, 12 Feb 1995 17:29:53 -0600 (CST)
  6.  
  7. ((Comments are appreciated.  -Bruce))
  8.  
  9.  
  10. Factoring large numbers is hard.  Unfortunately for algorithm
  11. designers, it is getting easier.  Even worse, it is getting
  12. easier faster than mathematicians expected.  In 1976 Richard Guy
  13. wrote: "I shall be surprised if anyone regularly factors numbers
  14. of size 10^80 without special form during the present century." 
  15. In 1977 Ron Rivest said that factoring a 125-digit number would
  16. take 40 quadrillion years.  In 1994 a 129-digit number was
  17. factored.  If there is any lesson in all this, it is that making
  18. predictions is foolish.
  19.  
  20. Table 1 shows factoring records over the past dozen years.  The
  21. fastest factoring algorithm during the time was the quadratic
  22. sieve.
  23.  
  24.          Table 1:  Factoring Using the Quadratic Sieve
  25.  
  26.          year     # of decimal               how many times harder to
  27.                   digits factored            factor a 512-bit number
  28.          1983     71                         > 20 million
  29.          1985     80                         > 2 million
  30.          1988     90                         250,000
  31.          1989     100                        30,000
  32.          1993     120                        500
  33.          1994     129                        100
  34.  
  35. These numbers are pretty frightening.  Today it is not uncommon
  36. to see 512-bit numbers used in operational systems.  Factoring
  37. them, and thereby completely compromising their security, is well
  38. in the range of possibility: A weekend-long worm on the Internet
  39. could do it.
  40.  
  41. Computing power is generally measured in mips-years: a one-
  42. million-instruction-per-second computer running for one year, or
  43. about 3*10^13 instructions.  By convention, a 1 mips machine is
  44. equivalent to the DEC VAX 11/780.  Hence, a mips-year is a VAX
  45. 11/780 running for a year, or the equivalent.
  46.  
  47. The 1983 factorization of a 71-digit number required 0.1 mips-
  48. years; the 1994 factorization of a 129-digit number required
  49. 5000.  This dramatic increase in computing power resulted largely
  50. from the introduction of distributed computing, using the idle
  51. time on a network of workstations.  The 1983 factorization used
  52. 9.5 CPU hours on a single Cray X-MP; the 1994 factorization used
  53. the idle time on 1600 computers around the world for about 8
  54. months.  Modern factoring methods lend themselves to this kind of
  55. distributed implementation.
  56.  
  57. The picture gets even worse.  A new factoring algorithm has taken
  58. over from the quadratic sieve: the general number field sieve. 
  59. In 1989 mathematicians would have told you that the general
  60. number field sieve would never be practical.  In 1992 they would
  61. have told you that it was practical, but only faster than the
  62. quadratic sieve for numbers greater than 130-150 digits or so. 
  63. Today it is known to be faster than the quadratic sieve for
  64. numbers well below 116 digits.  The general number field sieve
  65. can factor a 512-bit number over 10 times faster than the
  66. quadratic sieve.  The algorithm would require less than a year to
  67. run on an 1800-node Intel Paragon.  Table 2 gives the number of
  68. mips-years required to factor numbers of different sizes, given
  69. current implementations of the general number field sieve.
  70.  
  71.          Table 2: Factoring Using the General Number Field Sieve
  72.  
  73.          # of bits         mips-years required to factor
  74.  
  75.          512               30,000
  76.          768               2*10^8
  77.          1024              3*10^11
  78.          1280              1*10^14
  79.          1536              3*10^16
  80.          2048              3*10^20
  81.  
  82. And the general number field sieve is still getting faster. 
  83. Mathematicians keep coming up with new tricks, new optimizations,
  84. new techniques.  There's no reason to think this trend won't
  85. continue.  A related algorithm, the special number field sieve,
  86. can already factor numbers of a certain specialized form--numbers
  87. not generally used for cryptography--must faster than the general
  88. number field sieve can factor general numbers of the same size. 
  89. It is not unreasonable to assume that the general number field
  90. sieve can be optimized to run this fast; it is possible that the
  91. NSA already knows how to do this.  Table 3 gives the number of
  92. mips-years required for the special number field sieve to factor
  93. numbers of different lengths.
  94.  
  95.          Table 3: Factoring Using the Special Number Field Sieve
  96.  
  97.          # of bits         mips-years required to factor
  98.  
  99.          512               < 200
  100.          768               100,000
  101.          1024              3*10^7
  102.          1280              3*10^9
  103.          1536              2*10^11
  104.          2048              4*10^14
  105.  
  106. At a European Institute for System Security workshop in 1992, the
  107. participants agreed that a 1024-bit modulus should be sufficient
  108. for long-term secrets through 2002.  However, they warned: 
  109. "Although the participants of this workshop feel best qualified
  110. in their respective areas, this statement [with respect to
  111. lasting security] should be taken with caution."  This is good
  112. advice.
  113.  
  114. The wise cryptographer is ultra-conservative when choosing
  115. public-key key lengths.  To determine how long a key you need
  116. requires you to look at both the intended security and lifetime
  117. of the key, and the current state-of-the-art of factoring.  Today
  118. you need a 1024-bit number to get the level of security you got
  119. from a 512-bit number in the early 1980s.  If you want your keys
  120. to remain secure for 20 years, 1024 bits is likely too short.
  121.  
  122. Even if your particular secrets aren't worth the effort required
  123. to factor your modulus, you may be at risk.  Imagine an automatic
  124. banking system that uses RSA for security.  Mallory can stand up
  125. in court and say: "Did you read in the newspaper in 1994 that
  126. RSA-129 was broken, and that 512-bit numbers can be factored by
  127. any organization willing to spend a few million dollars and wait
  128. a few months?  My bank uses 512-bit numbers for security, and by
  129. the way I didn't make these seven withdrawals."  Even if Mallory
  130. is lying, the judge will probably put the onus on the bank to
  131. prove it.
  132.  
  133. Earlier I called making predictions foolish.  Now I am about to
  134. make some.  Table 4 gives my recommendations for public-key
  135. lengths, depending on how long you require the key to be secure. 
  136. There are three key lengths for each year, one secure against an
  137. individual, one secure against a major corporation, and the third
  138. secure against a major government.
  139.  
  140. Here are some assumptions from the mathematicians who factored
  141. RSA-129:
  142.  
  143.          We believe that we could acquire 100 thousand machines
  144.          without superhuman or unethical efforts.  That is, we would
  145.          not set free an Internet worm or virus to find resources for
  146.          us.  Many organizations have several thousand machines each
  147.          on the net.  Making use of their facilities would require
  148.          skillful diplomacy, but should not be impossible.  Assuming
  149.          the 5 mips average power, and one year elapsed time, it is
  150.          not too unreasonable to embark on a project which would
  151.          require half a million mips years.
  152.  
  153. The project to factor the 129-digit number harnesses an estimated
  154. 0.03% of the total computing power of the Internet, and they
  155. didn't even try very hard.  It isn't unreasonable to assume that
  156. a well-publicized project can harness 0.1% of the world's
  157. computing power for a year.
  158.  
  159. Assume a dedicated cryptanalyst can get his hands on 10,000 mips-
  160. years, a large corporation can get 10^7 mips-years, and that a
  161. large government can get 10^9 mips-years.  Also assume that
  162. computing power will increase by a factor of ten every five
  163. years.  And finally, assume that advances in factoring
  164. mathematics allows us to factor general numbers at the speeds of
  165. the special number field sieve.  Table 4 recommends different key
  166. lengths for security during different years.
  167.  
  168.          Table 4: Recommended public-key key lengths (in bits)
  169.  
  170.          Year     vs. I             vs. C             vs. G
  171.          1995      768              1280              1536
  172.          2000     1024              1280              1536
  173.          2005     1280              1536              2048
  174.          2010     1280              1536              2048
  175.          2015     1536              2048              2048
  176.  
  177. Remember to take the value of the key into account.  Public keys
  178. are often used to secure things of great value for a long time:
  179. the bank's master key for a digital cash system, the key the
  180. government uses to certify its passports, a notary public's
  181. digital signature key.  It probably isn't worth the effort to
  182. spend months of computing time to break an individual's private
  183. key, but if you can print your own money with a broken key the
  184. idea becomes more attractive.  A 1024-bit key is long enough to
  185. sign something that will be verified within the week, or month,
  186. or even a few years.  But you don't want to stand up in court
  187. twenty years from now with a digitally signed document, and have
  188. the opposition demonstrate how to forge documents with the same
  189. signature.
  190.  
  191. Making predictions beyond the near future is even more foolish. 
  192. Who knows what kind of advances in computing, networking, and
  193. mathematics are going to happen by 2020?  However, if you look at
  194. the broad picture, in every decade we can factor numbers twice as
  195. long as in the previous decade.  This leads to Table 5.
  196.  
  197.          Table 5:  Long-range factoring predictions 
  198.  
  199.          Year     Key length (in bits)
  200.          1995     1024
  201.          2005     2048
  202.          2015     4096
  203.          2025     8192
  204.          2035     16,384
  205.          2045     32,768
  206.  
  207. Not everyone will agree with my recommendations.  The NSA has
  208. mandated 512-bit to 1024-bit keys for their Digital Signature
  209. Standard--far less than I recommend for long-term security.  PGP
  210. has a maximum RSA key length of 1280 bits.  Lenstra, the world's
  211. most successful factorer, refuses to make predictions past ten
  212. years.  And Table 6 gives Ron Rivest's key-length
  213. recommendations, originally made in 1990, which I consider much
  214. too optimistic.  While his analysis looks fine on paper, recent
  215. history illustrates that surprises regularly happen.  It makes
  216. sense to choose your keys to be resilient against future
  217. surprises.
  218.  
  219.          Table 6: Rivest's Optimistic Key-Length Recommendations (In
  220.          Bits)
  221.  
  222.          Year     Low      Avg      High
  223.          1990     398      515      1289
  224.          1995     405      542      1399
  225.          2000     422      572      1512
  226.          2005     439      602      1628
  227.          2010     455      631      1754
  228.          2015     472      661      1884
  229.          2020     489      677      2017
  230.  
  231.          Low estimates assume a budget of $25,000, the quadratic
  232.          sieve algorithm, and a technology advance of 20% per year. 
  233.          Average estimates assume a budget of $25 million, the
  234.          general number field sieve algorithm, and a technology
  235.          advance of 33% per year.  High estimates assume a budget of
  236.          $25 billion, a general quadratic sieve algorithm running at
  237.          the speed of the special number field sieve, and a
  238.          technology advance of 45% per year.
  239.  
  240. There is always the possibility that an advance in factoring will
  241. surprise me as well, but I think that unlikely.  But why trust
  242. me?  I just proved my own foolishness by making predictions.
  243.  
  244.