Article View: news.software.nntp
Article #62631Re: xBin and PARity files
From: Kjetil Torgrim Homme
Date: Wed, 01 Jan 2003 21:32
Date: Wed, 01 Jan 2003 21:32
108 lines
5888 bytes
5888 bytes
[Curt Welch]: > > Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote: > > how about including the hashes of the correct blocks instead? > > all the leaves, not the tree. these can be verified against the > > hash tree in the real parts. for a segment of 100 parts of 18 > > blocks, the hashes use 36 kB (+N% for encoding), which seems > > reasonable to me. (if you want to, you can require segments to > > start on even offsets, and include the hashes from the level > > above the leaves, cutting the size in half.) > > I thought about that, but it's a lot of data if the par file > covers a lot of segments. it's 20 bytes per block covered, or 0.09% of the file size with 22500 byte blocks. > It won't fit in the headers. no, but that's not important, it wouldn't protect against fakes anyway. > But you could put in the article body. The problem is that you > need the hash not for the entire range, but for each par segment. > Typical article size is in the 400KB range which means, or up to > say 20 or hash blocks (of the 22500 size), which means worse case > hash values of around 5 per segment. You would need those for > every segemnt, so if you covered a 10MB segment of a file with the > PAR data, you are talking 25 segments and 125 hash values which is > 3K or 4K worth of metadata. That would work for a 400K par post, > but like I said, not in the headers. I'm not sure I've got this right. I thought we'd split the file into segments of 100 article, and make PAR for each of these segments. the size of the PAR information is the same as one article. a PAR article would in addition include the correct hashes for the 100 articles it covers. that's the 36 KB i mentioned. > Ah, but it would be of some potential use to just include a > different single hash value of each par segment. That wouldn't > allow you to prove the generated segment was part of the xBin > file, it would help you spot problems quicker, and then you only > need one hash value per segment instead of up to 5. I suspect > however that even that isn't worth it however. where does this "5 hashes per segment" come from? > > it really depends on how PAR works -- can you do block by block, or > > PAR file by PAR file? if the former, you can detect bogus PAR files > > much earlier if you're told the hash value of the block. > > Adding the large set of hash data to the par file wouldn't save > you any download time, right, quite the opposite (10%). > and it wouldn't make it easier to figure out which par files were > good vs bad. yes it would, by an order of 20 or more (the number of blocks in a part). if you have five PAR files, and need three of them, you'll need to try a lot of combinations before finding out which two are fake. there are ten possible picks (5!/2!3!), only one is correct. in most systems it will probably give a better speedup than 20, due to caching effects. a devious attacker may let the first block be correct, so the program may pick the wrong PAR files. this doesn't really matter, the block is still valid, and the program just has to do a new search when it turns out block two is incorrect. > It would only save computation time because instead of computing > and generating your N missing articles, you would know if they > were good after the first was generated. I suspect the simplicity > of leaving the hash data out is more important than saving some > number crunching time. it really depends on how paranoid we are. if there are no attackers, the 10% increase in size of PAR files isn't worth it. history has shown us that protocols who assume people are benign get exploited, though. > The potential file name length issues is what worries me. > > I was suggesting putting the roothash in the directory name as: > > XB-ROOTHASH/OFFSET-SEQ-SPAN.XBP > > XB-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxx-x-xx.XBP > > to keep the files names a bit more managable. Maybe you can even > get away with using a name like that in a begin or =begin line? I don't think uudecode is clever enough to create the directory if needed. > Maybe the way to do it is use a single file name in the actual > article "begin" or "=ybegin" line like you suggest, but just > assume it will never be created like that for the "disk format > standard"? yeah, users generally shouldn't deal with this, the client should do all the work behind the scenes. -- Kjetil T. | read and make up your own mind | http://www.cactus48.com/truth.html
Technical Details
Message-ID:
<1rlm24a74r.fsf@thrir.ifi.uio.no>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!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mailReferences:
<20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <1rlm24a74r.fsf@thrir.ifi.uio.no> Subject: Re: xBin and PARity files Date: Wed, 01 Jan 2003 21:32:20 +0000 From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@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!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail Newsgroups: news.software.nntp Organization: Dept. of Informatics, Univ. of Oslo, Norway Lines: 107 NNTP-Posting-Host: thrir.ifi.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 1041456741 23762 129.240.65.203 (1 Jan 2003 21:32:21 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 1 Jan 2003 21:32:21 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7