home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / sci / crypt / 3263 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  1.6 KB

  1. Path: sparky!uunet!sun-barr!ames!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!concert!duke!trt
  2. From: trt@duke.cs.duke.edu (Tom Truscott)
  3. Newsgroups: sci.crypt
  4. Subject: Re: Secure password generation
  5. Message-ID: <716614576@romeo.cs.duke.edu>
  6. Date: 16 Sep 92 03:36:17 GMT
  7. References: <1992Sep12.020756.17214@morwyn.uucp> <256379411DN5.61R@tanda.isis.org>
  8. Distribution: na
  9. Organization: IBM RTP
  10. Lines: 29
  11.  
  12.  
  13. This is not a secure password generator!
  14. If there are no arguments it seeds the pseudo-random number generator
  15. with one of 32k different values.
  16. Trial decryption is thus trivial.
  17. (If there *are* arguments it probably seeds from an even smaller range.)
  18.  
  19. You don't need a better pseudo-random number generator,
  20. you need a better source of randomness.  A high-resolution clock
  21. might give you 32 unguessable bits, but that is not enough.
  22. Another possibility is to have the user type something and measure
  23. inter-character times with a busy loop:
  24.     /* this is a crude example */
  25.     for (8 times) {
  26.         ask user to type something
  27.         for (i = 0; no_keypress; i++)
  28.             ;
  29.         the low-order value of "i" is probably quite random now
  30.     }
  31. This produces 64 unguessable bits (one might hope) that could be used
  32. to seed a good PRNG, or probably even a crummy one by periodically doing:
  33.         srand(rand() ^ some_of_the_unguessable_bits);
  34.  
  35. It is amazing how easy it is to break most of the posted password generators.
  36. But then again, it is an easy trap to fall into.
  37. Someone please post a really strong generator,
  38. and try and make it widely available, and become famous.
  39.  
  40. Tom Truscott
  41.