Article View: news.software.nntp
Article #61429Re: [FNTP] more on hash chunk sizes
From: Curt Welch
Date: Sun, 13 Oct 2002 23:17
Date: Sun, 13 Oct 2002 23:17
69 lines
4662 bytes
4662 bytes
claus-usenet-20021013@faerber.muc.de (Claus_F๏ฟฝrber) wrote: > There seems to be a hash function called TigerTree that already does > that. TigerTree uses 1 kiB blocks. > > A derieved method is called bitprint, which just concatenats a SHA1 and > a TigerTree hash. After a bit more searching, I still haven't come across a good description of who is using either of these and for what, but it does seem to be talked about in the context of p2p file sharing. I suspect that the bitprint is simply an attempt to create a large hash (it's 44 bytes or 352 bits) which is (/will be) used as a universial file identifier in P2P networks. This of course is bascially what we are after here as well, but our requirements are a bit different. Collissions on Usenet are much less dangerous because unless it happens in the same group within a period of a few months, the damage is likely to be mostly harmless. And the odds of that happening with a hash as small as 64 bits is low enough to work fine for Usenet. On a large distributed p2p file-system where stuff could hang around for 50 years, any collision might prevent the new file from being distributed correctly (or could break both the old and new files). Putting a 352 bit hash into a Message-Id would be way past resonable for Usenet. However, if this bitprint system became (or is already) some type of standard for P2P systems, then building on it for our application may have merit. One way to do that is to simply include the bitprint for the file in the headers and use that as the ultimate "File-ID". And for the hash that goes into the Message-Id, we can simply pick N bits from the TigerTree hash (where we pick an N that we feel is a resonable balance between uniquess for Message-IDs and Message-ID length). The question however is does this buy us anything? Even if a P2P system identifies files by their bitprint, what would the advantage of using the same system on Usenet be? To post a file segment to Usenet with a TigerTable hash "signature" would still require a pass over the entire file to build the hash tree. Just knowing the bitprint for the file alone would not help. And the 1K blocksize means uuencode posts using this system would be forced to break segements at 45KB boundries. (i.e. multiples of 1024 uuencoded lines per article). Wait, I take that back. There is another fix for the uuencod problem. You can break the the uuencode data at any line, and then simply include extra data in the headers for the rest of the 1KB hash block. It would have to be in the haaders to prevent braking uudecoding software, but it would always be 1K or less of data if the Hash block size was 1Kb. So, for example, a 5000 line uuencode post would have 225,000 bytes of data. That's 219 blocks of 1KB each with 774 bytes in the last block. The 280 bytes of missing data from the last block can be encoded into the headers somehow to allow the hash to be verified. But, for posts from the middle of the file, you could end up with up to 2KB-2 bytes of data max you might have to put into the headers (because you have to complete the hash block at both ends of the post). I don't know if this is a resonable thing to define into the standard, but it's yet another option to look at. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20021013191744.000$dd@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!logbridge.uoregon.edu!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<hpk9quk1cq0ti2reeu03epd0tgf4b8a8p0@4ax.com> <20021010014047.034$XV@newsreader.com> <ao4htp$rq1$1@bob.news.rcn.net> <20021011161123.133$Fc_-_@newsreader.com> <8Yl1XwH3cDC@3247.org>Show Full Headers
Complete Article Headers
Message-ID: <20021013191744.000$dd@newsreader.com>
Subject: Re: [FNTP] more on hash chunk sizes
Date: Sun, 13 Oct 2002 23:17:44 +0000
From: curt@kcwc.com (Curt Welch)
References: <hpk9quk1cq0ti2reeu03epd0tgf4b8a8p0@4ax.com> <20021010014047.034$XV@newsreader.com> <ao4htp$rq1$1@bob.news.rcn.net> <20021011161123.133$Fc_-_@newsreader.com> <8Yl1XwH3cDC@3247.org>
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!logbridge.uoregon.edu!newsfeed.cwix.com!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 2NoflM3U9.iCSQ3XaDHGzGl3QBY2B3UhRPXO5DCF8Vt_EK=V
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: 68