home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / crypt / 2741 < prev    next >
Encoding:
Text File  |  1992-07-25  |  4.5 KB  |  89 lines

  1. Newsgroups: sci.crypt
  2. Path: sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!jonathan
  3. From: jonathan@chpc.utexas.edu (Jonathan Thornburg)
  4. Subject: "random generator" passwords (was: Re: Keeping track of a lot of passwords)
  5. Message-ID: <1992Jul26.072631.14847@chpc.utexas.edu>
  6. Summary: random number generators produce *highly* *insecure* passwords
  7. Keywords: password choose random number generator pattern insecure break
  8. Sender: jonathan@einstein.ph.utexas.edu (Jonathan Thornburg)
  9. Organization: U of Texas at Austin / Physics Dept / Center for Relativity
  10. References: <62453@cup.portal.com> <5006@transfer.stratus.com> <bill.711857811@chaos.cs.umn.edu>
  11. Date: Sun, 26 Jul 92 07:26:31 GMT
  12. Lines: 75
  13.  
  14. In article <bill.711857811@chaos.cs.umn.edu> bill@chaos.cs.umn.edu
  15. (Hari Seldon) writes [I *think* have the multi-level attribution
  16. right here, if not and I'm misattributing anything, please forgive me]:
  17. >... i wrote a small rng to 
  18. >get new ones [passwords] with.
  19. >and the code for it all is in a wierd jumping off
  20. >point in the hh. [handheld computer] so you need to know where to
  21. >jump to to start the thing.
  22. >it's not perfect but it helps.
  23. >i'd considered putting it in my sons pc jr but some day .....
  24.  
  25. Using a random number generator (RNG) to generate passwords is
  26. almost always a very bad idea -- it yields *highly* *insecure*
  27. passwords.  There are two reasons for this:
  28.  
  29. (1) The set of passwords your "small rng" can produce is at most
  30.     the number of possible internal states in the RNG.  For a
  31.     typical RNG this at most 2**32 (= 4 billion), and sometimes
  32.     only 64K.  Either is far too small, and could easily be
  33.     exhaustively searched.  The classic (1978) Bell System Technical
  34.     Journal on Unix Password Security describes a successful
  35.     attack of this sort (on a pre-Unix system).
  36.  
  37. (2) Even if you use an RNG with a large internal state space,
  38.     it will still probably produce passwords which can be easily
  39.     broken.  The problem is that to produce good crypto keys
  40.     (which is essentially what you're trying to do), you need
  41.     a stream of "random numbers" which is *cryptographically*
  42.     strong, not just "random" in statistical sense.  The difference
  43.     here is that cryptographically strong random streams are
  44.     (ideally) *unpredictable* even given complete knowledge of
  45.     the output so far, i.e. the next password is unpredictable
  46.     even given knowledge of all your past passwords.
  47.  
  48.     In contrast, normal "statistically good" RNGs (i.e. all those
  49.     in common use, all those in Knuth v.2, all those which those
  50.     of us lacking in extensive crypto training are likely to come
  51.     up with) may have good randomness properties (but does your
  52.     "small rng" pass the spectral test described by Knuth?),
  53.     but their relatively simple internal structure (*) makes
  54.     their future output relatively easy to predict from a knowledge
  55.     of even a few past outputs.
  56.  
  57.     For example, for the commonly-used linear congruential
  58.     random number generators, Knuth has an excercise showing
  59.     how knowing any K consecutive "random number" outputs
  60.     suffices to determine the internal state, and hence all
  61.     future outputs.  K here is some small integer, I think 3.
  62.     In other words, anyone knowing 3 (say) consecutive passwords
  63.     produced by such an RNG could break the RNG and thereafter
  64.     be able to know all future RNG outputs.
  65.     
  66.     Your implementation may contain special safeguards against
  67.     these and other similar problems, but there are murky waters
  68.     here -- key generation is *hard*, and computers don't like
  69.     to produce "truly random" (high-entropy) outputs.
  70.  
  71. (*) Note that complicating the RNG internal structure without an
  72.     underlying theory to guide you will almost certainly make
  73.     matters *worse*.  Knuth explains why relatively simple RNGs
  74.     are probably the best for most (non-crypto) uses -- we can
  75.     theoretically analyze their behavior and *prove* they're
  76.     "statistically random".  In contrast, Knuth also explains
  77.     why and how "random number generators chosen at random" are
  78.     almost always very bad, and gives a truly horrifying/astonishing
  79.     example.
  80.  
  81. Remembering multiple cryptographically-independent-and-high-entropy
  82. passwords is a hard problem, but using a "small rng" to generate them
  83. is not the solution.
  84.  
  85. - Jonathan Thornburg
  86.   <jonathan@einstein.ph.utexas.edu> or <jonathan@hermes.chpc.utexas.edu>
  87.   University of Texas at Austin / Physics Dept / Center for Relativity
  88.   and (for a few more months) U of British Columbia / {Astronomy,Physics}
  89.