[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sip] Good Hash: draft-ietf-sip-fork-loop-fix-03



Pete,

I use djb2 (a linear hash) with loop-hash = HASH(routing info) + HASH( call-id ), modulo 2^32 (or 64)

So no concatenation. I guess this avoids the issue you mentioned.

Regards,
Jeroen 

-----Oorspronkelijk bericht -----
Van: "Pete Cordell" <pete at tech-know-ware.com>
Aan: "Robert Sparks" <rjsparks at nostrum.com>; "Jeroen Van Bemmel" <jbemmel at zonnet.nl>
CC: "Cullen Jennings" <fluffy at cisco.com>; "SIP" <sip at ietf.org>
Verzonden: 14-9-06 17:59
Onderwerp: Re: [Sip] Good Hash: draft-ietf-sip-fork-loop-fix-03

----- From: "Robert Sparks" <rjsparks at nostrum.com>

> That may be exactly why call-id and cseq were included in the hash in 
> 3261. Assuming that's so, then
> all we need are bits that change between transactions. The first part  of 
> the via branch parameter would
> be enough.
>
> So, I propose I add text explaining why you SHOULD (do we make this 
> MUST?) add some set of bits that
> change between requests, and note that either the first part of the  via 
> branch or the combination of call-id
> and cseq would be good choices.

That's quite cunning Jeroen!  I think it can only be SHOULD, because the 
whole thing is SHOULD and RECOMMENDED etc.

One issue is that this works well for the cryptographic hashes, but I don't 
think it will work for the linear hash I mentioned in an earlier e-mail, 
i.e.:

for( i=0; i<strlen(data); ++i )
    hash = hash * MULTIPLIER + data[i];

where MULTIPLIER is 31 or 37.



_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-implementors at cs.columbia.edu for questions on current sip
Use sipping at ietf.org for new developments on the application of sip