apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: Hash collision vectors in APR?
Date Wed, 11 Jan 2012 03:35:20 GMT
On 1/10/2012 5:29 PM, Chris Darroch wrote:
> Bojan Smojver wrote:
> 
>> On Fri, 2012-01-06 at 10:52 +1100, Bojan Smojver wrote:
>>> +    if (apr_generate_random_bytes(
>>> +            (unsigned char *)&ht->seed, sizeof(ht->seed)) != APR_SUCCESS)
>>> +        return NULL;
>>
>> Chris,
>>
>> What I mean is, instead of return NULL, we could have ht->seed =
>> (unsigned int) ht. Not as random as /dev/urandom, but probably better
>> than zero.

Or, rather, ht->seed = (unsigned int)ht - 1 to avoid the obviousness
of folding on even values.


Mime
View raw message