> > In a message dated 12/12/01 5:16:17 AM Pacific Standard Time,
> > shlomif_at_vipe.technion.ac.il writes:
> >
> > > I believe MD5 was shown to be a perfect hash for arbitrarily-length
> > > data
> > > by Dr. Ron Rivest who invented it. Otherwise, it would not have been
so
> > > commonly used for cryptographical applications. However, it takes
quite
> > > a
> > > lot of time to compute.
A perfect hash can be constructed for predictable data, only. Anything else,
including MD5, will have some probability of collisions.
> I use only the first 32 bits of the MD5 return code (or 64 bits in rare
> cases where an int is defined as a 64-bits integer).
I would expect that using a subset of the key would very greatly increase the
chances of a collision. But you will be safe as long as you are prepared for
collisions and don't overlook the possibility.
BR
Received on Wed Dec 12 2001 - 17:07:59 IST