Article View: news.software.nntp
Article #63151Re: Is this a valid Message-ID?
From: Curt Welch
Date: Wed, 15 Jan 2003 01:37
Date: Wed, 15 Jan 2003 01:37
89 lines
5935 bytes
5935 bytes
greg andruk <gja@meowing.net> wrote: > Curt Welch wrote: > > > Russ Allbery <rra@stanford.edu> wrote: > > >> I think you're putting way too much faith in random numbers. > > > I think Usenet swtiched to that faith about 10 years ago with the > > relase of C-News. Is that when the old numbering system when out the > > door? It's not just a faith anymore, it's what everyone uses. It's > > the only way it can practically be done. > > There's nothing random about the message IDs generated by C News or INN > They're hard to guess if you're not on the originating system and > watching things, but that's not the same thing. I thought C news started using random data in the Message-Id. But like many things, I could be wrong about that. > The real change is that more newsreaders started generating their own IDs > instead of using the server generated defaults. Clients without a unique > identifier (IP address, hostname, MAC ID) might have a tough time finding > unique information, but even this is becoming a legacy problem now that > pretty much everything has on-board Ethernet. Even the handhelds have > serial numbers built in. This kind of information would best be hashed, > but that's still not random. Nothing is random in digital computers. It's all hashed on data provided to the computer whether it's hashed with a random number generator or some type of cryptographic hash function like MD5 or the "INN hash function" which takes data in and produces a Message-ID out. There is one, and only one, algorithm to guarantee uniqueness across all Message-IDs. That's to compare your potential new ID to _every_ Message-ID ever used on Usenet in the past. That of couse is totaly unworkable. All other "tricks" to generate a unique Message-ID are simply techniques which minimize the probability of a collsion with some Message-ID generated in the past, or some Message-ID which might be generated in the future. It's impossible for any of those "tricks" to gurantee uniqueness. Even when we had control over the algorithms such as using a counter to number articles like (1@uunet, 2@uunet, 3@uunet) it was still impossible to guarantee uniqness because machines would still crash and loose their count, or admins would screw up and reset the counter by mistake. If it happened only once out of very 1,000,000 articles, you still had a collision probelm of 1 out of 1,000,000. Once the problem moves into the realm of "tricks for reducing probablility", then you can compare all your tricks to the most obvious one of generating a large enough "random" number to reduce the probablity to below that acheived by the other tricks. And by "random" I mean _any_ algorithm which when used over a long period of time over many different machines in many different locations will produce a random distribution of bit values by which to build the message-ids from. Hashing Usenet article data is a good source of "random" bits and it makes no difference if the hash is of the message you are generating the bits for or not. This problem is much the same as the one of writing a "good" encryption algorithm. It seems that the "more complex" you make the algorithm, the stronger it gets. But in fact, most attempts to make it more complex make it weaker. All the "tricks" you try to build into a Message-Id generation algorthim to make it unique tend to make it far weaker than it seems. The old "number each article sequentially in a machine" seems fool-proof. But once you put the typical fool in the equation - us admins - you see the real-world probability of a collsion is actually much higher than it would first seem. Using a micro-second time-stamped clock seems fool-proof as well. It's not. Clocks get re-set. Clocks get set to the wrong time. Systems get faster, and busier, and the next thing you know you have 100 Message-IDs being generated within 1 clock cycle. Or someone has ported the code to a system that only has a ms clock etc. Trying to generate a good 80 bit random number of course is not easy either and could be prone to some of the same low-level operator type errors (a software bug which caused it to contain only 20 bits but wasn't noticed until a million copies of the software was in use). I suspect however that it's a better overall solution to the problem than the various hard-coded tricks which are common today which go along with the mis-conception that they produce "guaranteed unique" IDs. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20030114203728.176$ac@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!rip!news.webusenet.com!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<4o6cfxfd2.ln2@thune.mrc-home.org> <1rvg0sbd7t.fsf@vingodur.ifi.uio.no> <8dqRqDeocDD@3247.org> <20030114132134.418$09@newsreader.com> <yld6mz8s6f.fsf@windlord.stanford.edu> <20030114171106.956$rG@newsreader.com> <1ashj69g8wsnb.dlg@meowing.net>Show Full Headers
Complete Article Headers
Message-ID: <20030114203728.176$ac@newsreader.com>
Subject: Re: Is this a valid Message-ID?
Date: Wed, 15 Jan 2003 01:37:28 +0000
From: curt@kcwc.com (Curt Welch)
References: <4o6cfxfd2.ln2@thune.mrc-home.org> <1rvg0sbd7t.fsf@vingodur.ifi.uio.no> <8dqRqDeocDD@3247.org> <20030114132134.418$09@newsreader.com> <yld6mz8s6f.fsf@windlord.stanford.edu> <20030114171106.956$rG@newsreader.com> <1ashj69g8wsnb.dlg@meowing.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!rip!news.webusenet.com!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com i7LWfvsQygArGLJNl6YjQTmvfO9Bk,n8nORsY9Z9fM53O0fL-F
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 88