Subject: Re: RelCache (aka ELF prebinding) news
To: Bang Jun-Young <junyoung@netbsd.org>
From: Perry E. Metzger <perry@piermont.com>
List: tech-userlevel
Date: 12/02/2002 10:28:19
Bang Jun-Young <junyoung@netbsd.org> writes:
> > 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.

If you *really* want to do a check that depends on the file itself so
it can be verified later, you should stick with MD5 or SHA. If you
just want a unique identifier, random numbers are more than
sufficient.


-- 
Perry E. Metzger		perry@piermont.com