Generating unique numbers?

Jiri Baum jiri at baum.com.au
Sat Jun 1 00:04:40 EDT 2002


Jeff (jepler at unpythonic.net) wrote:
> Yeah, but it was fun to try to ballpark the numbers.  One thing I didn't
> mention in my earlier message is that 2**65 unique IDs is right around
> the number necessary to see birthday-paradox collisions in 128-bit hashes
> such as MD5 with p=0.5.  Still very uncommon for a 160-bit hash like SHA,
> though.

Personally, I'd be more comfortable with random numbers than with the
IP/process-id/etc thing, because random numbers eliminate the human factor.
As has been noted, lots of people use 10.0.0.1. *I* use 10.0.0.1. There are
ethernet cards with the same ether addresses. Random numbers can at least
be analyzed mathematically and relied-upon to obey the predictions.


Jiri
-- 
Jiri Baum <jiri at baum.com.au>           http://www.csse.monash.edu.au/~jirib
  MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools



More information about the Python-list mailing list