Subject: Re: RelCache (aka ELF prebinding) news
To: Perry E. Metzger <perry@piermont.com>
From: Bang Jun-Young <junyoung@netbsd.org>
List: tech-userlevel
Date: 12/02/2002 14:44:26
On Sun, Dec 01, 2002 at 11:22:09PM -0500, Perry E. Metzger wrote:
> 
> Bang Jun-Young <junyoung@netbsd.org> writes:
> > > In that case, what is the point of using an MD5 checksum?  A random number
> > > of the same length would serve equally well.
> > 
> > Since MD5 checksum is known to have very good distribution (i.e. a lot less
> > hash collision), it's the safest method to check for validity of the file.
> 
> No. Thor is absolutely correct. There is no advantage to an MD5
> checksum of the file over any random function yielding 128 bits if you
> do not check the hash later on. There is no need for a hash.

How about this one:

	upper 32 bits = CRC32 | lower 32 bits = ELF hash to a date string
				generated from ctime() when prebinding is
				performed.
	---------------------------------------------------------------
	= 16+1 byte string in .cksum section

With this method we can get both validity check and uniqueness.

Jun-Young

-- 
Bang Jun-Young <junyoung@netbsd.org>