On Tue, 2008-10-28 at 17:30 -0400, Dale Worley wrote: > On Mon, 2008-10-27 at 17:05 -0400, Scott Lawrence wrote: > > > Can loopdetectionkey be reduced to, say, 32 bits, rather than the full > > > 128 bits? > > > > I'd prefer not to mess with that right now, since it could cause false > > loop detections if two loops generated the same hash. > > Looking at BranchId::loopDetected, loopdetectkey's are only compared > within the branch parameters of an individual message. So every > loopdetectkey is compared to maybe 20 other loopdetectkey's, which > significantly reduces the chances for an accidental collision. > > Fiddling with the math, if there are at most V Via's per message, and we > want to have at most probability C of a collision in each message, we > need at least log2(V/C) bits in loopdetectkey. If V = 20 and C = 2^-32, > we need at least 36.3 bits in loopdetectkey. If we use 66 bits in > loopdetectkey (about 1/2 of what we do now), then C = 2^-39 = 10^-18, > which seems big enough for practical purposes, given that there are only > a few billion phone calls a day on Earth. > > So I propose that we abbreviate loopdetectkey to 66 bits (11 characters > in base64).
Ha... my plan worked. I didn't want to ask you to do the math, but since you've done it... Sounds good to me. Martin take note - Dale is making all our messages significantly smaller ! _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
