Article View: news.software.nntp
Article #64828Re: xBin library version 0.1
From: Chris AtLee
Date: Thu, 10 Apr 2003 22:55
Date: Thu, 10 Apr 2003 22:55
132 lines
8140 bytes
8140 bytes
On Thu, 10 Apr 2003 21:46:00 +0000, Curt Welch wrote: > "Chris AtLee" <catlee@canada.com> wrote: >> On Wed, 09 Apr 2003 23:14:13 +0000, Curt Welch wrote: >> > "Chris AtLee" <catlee@canada.com> wrote: >> "In order to protect against collisions between leaf hashes and >> internal hashes, different hash constructs are used to hash the leaf >> nodes and the internal nodes. > > Very odd. I have no idea why they think 1) doing that will protect > against collisions, and 2) why that is useful. > > I had scanned that web page before but didn't read it careful enough to > notice that. > > Does anyone see _any_ point in doing that? > > The section is under the description of Merkle Hash Trees so maybe this > was an idea that Merkle added in his original paper? > >> I haven't checked the source to see if tigertree hashes actually use >> this or not, but this is where I got it from. > > I've looked at some TigerTree code and didn't notice it doing anything > like that. But, I might have missed it just like I did when I read the > above document because I didn't expect it to be there. I just checked, and they don't do anything like this. >> Yes, the bitprint is a combination of the SHA1 hash with the TigerTree >> hash of a file (which is different from a tiger hash of a file - a >> tiger tree hashes combines tiger hashes of 1024 bytes into a merkle >> hash tree; the tiger hash itself knows nothing about trees, so it could >> be used on the entire file) > > Your wording is a bit odd there. You say "so it could be used on the > entire file". What is your point? In your previous post you said: > There is also a hash standard called "bitprint" (if I remeber correctly) > which was created for use in P2P networks. It seems to be a standard > without a home (much like xBin). If I remeber, it's a tiger hash > combined with an SHA1 hash. This ends up creating a "huge" (192+120 > bit) file hash used to identify files. Only the tiger-hash part would > be useful in veryifying file segments. I just wanted to clarify that there was a difference between a tiger-hash of a file and a tiger-tree-hash of a file. >> All >> of this means that the xBin headers will be slightly larger since the >> TigerTree hash is longer and minimal hash tree complement will be >> larger since the merkle hash tree is larger. > > Yeah, there are issues. <snip> > For usenet, we really need to put these hash values in the header, not > in the body. We need to add this hash data to the posts in a way that > won't break current decoders. With yEnc, because there's a begin and > end marker in every article, it would be straight forward to define a > text format for the hash data which was placed in the body, but outside > the yEnc data in the article. Current yEnc decoders would just ignore > it. With uuencode however, there are no begin and end markers on each > article, so adding any extra text in the body is likely to break some > decoders. You might be able to make it work because most decoders > already have logic to ignore signatures added by some servers to all > posts, so maybe hiding the hash data in a signature at the end of the > body would work. <snip> > But, putting the hash data in the headers would work for sure in terms > of not breaking current usenet decoders. And, on top of that, having it > in the header allows clients to fetch the hash tree data with HEAD > commands without having forceing them to fetch the entire body. There > are various applications were this would be useful. Hmm, I hadn't thought that the hash data would be useful without the article data...The root hash (or part of it) needs to be in the headers so that clients can quickly find articles with HEAD commands, but why would having the "minimal hash tree complement" in the headers be necessary? You can't tell if it's valid or not unless you download the entire article. > However, with SHA1 hashes, and 22500 byte blocks, the amount of hash > data is already approaching the limits of how much data you can safely > put into the header without running into line length or header length > limits which exist on some current servers. > > For a 1GB file, with 512KB per aritcle, and a 32KB hash block size, you > are talking about needing around 19 hash values per article. With 1KB > hash block sizes, you add about 10 hashes to that bringinging it to 29 > hash values. > > If you make it a tigertree hash as well with 24 bytes per hash instead > of 20, you are talking about 696 bytes of hash data instead of 19*20 or > 380 bytes so swtiching from the type of system we are looking at for the > current xBin to TigherTree would come close to doubling the amount of > hash data we are trying to stuff into the headers for a typical "large" > file of today. So that's yet another issue to weigh when looking at > this decission. There are options for butting that much data into the > header, but it causes problems which could make the standard harder for > usenet as a whole to accept. If it does have to go in the headers, you could always split it up into Content-Merkle-Tree1, Content-Merkle-Tree2, etc. How big can a header be? Are headers 8-bit clean? Otherwise multiply your above figures by 1.33 for base64 encoding. > The hash block size also sets the minimum size of a multipart post. > People sometimes flood groups with 1000 part multipart posts which only > have 2 lines of uuencoded data per article. Having a large minimum size > (32K vs 1K) is also seen as an advantage to make some types of abuse > like this easy and natural to filter at the source. This however I > don't see as important at the other issues. You could restrict xBin posts to some multiple of 1K, but still use 1K as the hash block size. In addition, restricting xBin posts to some power of 2 multiple of 1K, like 32K, would make the "minimal hash tree complement" much smaller since you'd be guaranteeing that the bottom 5 rows (in this example) of the partial tree computed from the article data would be complete, therefore you wouldn't need to include anything below row 5 in the minimal tree complement. (How's that for a run on sentence?) So you could define an "xBin block" to be 32678 bytes, the size and offset values in the Message-ID header would use this block size to count, which would in effect restrict the posts to use that block size. Still, the last post of the file may have too many hashes to include in the header since it wouldn't necessarily be a multiple of 32K... Cheers, Chris
Technical Details
Message-ID:
<pan.2003.04.10.22.55.59.176315@canada.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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.webusenet.com!news03.bloor.is.net.cable.rogers.com!news01.bloor.is.net.cable.rogers.com.POSTED!not-for-mailReferences:
<pan.2003.04.08.05.21.36.142899@canada.com> <l_Cka.19193$iy5.537691@twister2.libero.it> <pan.2003.04.08.17.40.39.978437@canada.com> <pan.2003.04.08.18.19.33.288947@canada.com> <20030409191413.445$rS@newsreader.com> <pan.2003.04.10.18.15.24.309042@canada.com> <20030410174600.804$YN@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <pan.2003.04.10.22.55.59.176315@canada.com> Subject: Re: xBin library version 0.1 Date: Thu, 10 Apr 2003 22:55:59 GMT From: "Chris AtLee" <catlee@canada.com> References: <pan.2003.04.08.05.21.36.142899@canada.com> <l_Cka.19193$iy5.537691@twister2.libero.it> <pan.2003.04.08.17.40.39.978437@canada.com> <pan.2003.04.08.18.19.33.288947@canada.com> <20030409191413.445$rS@newsreader.com> <pan.2003.04.10.18.15.24.309042@canada.com> <20030410174600.804$YN@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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!sjc70.webusenet.com!news.webusenet.com!news03.bloor.is.net.cable.rogers.com!news01.bloor.is.net.cable.rogers.com.POSTED!not-for-mail User-Agent: Pan/0.13.4 (She had eyes like strange sins. (Debian GNU/Linux)) Newsgroups: news.software.nntp MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 131 NNTP-Posting-Host: 24.114.32.59 X-Complaints-To: abuse@rogers.com X-Trace: news01.bloor.is.net.cable.rogers.com 1050015359 24.114.32.59 (Thu, 10 Apr 2003 18:55:59 EDT) NNTP-Posting-Date: Thu, 10 Apr 2003 18:55:59 EDT