Article View: news.software.nntp
Article #62436Re: xBin (Power-Post 2003 - requesting input from authorities..)
From: Curt Welch
Date: Tue, 24 Dec 2002 07:41
Date: Tue, 24 Dec 2002 07:41
351 lines
19671 bytes
19671 bytes
Rene <invalid@email.addr> wrote: > curt@kcwc.com (Curt Welch) wrote: > This system works fine for its purpose: To uniquely identify files within > the network, even if the same file is inserted into the p2p-network at > two different places. As long as the file is (bit for bit) the same, so > is the hash. Like I said in my other posts, there's what looks like a standard called bitprint which seems like it was defined for P2P use. I can't tell if any P2P system is actually using it however. But the name no doubt comes from "fingerprint" as a uniq ID for the file. It's a very large hash however because the bitprint is a combination of both a TigerTree (which is a hash-tree build on 192 bit Tiger hash and 1K blocks), and the SHA-1 of the file, which adds up to an 352 bit hash of the file. They are no doubt trying to create a hash so unique that you can use it for thousands of years for every file createad and still have the odds of a collsion be near 0. > The community has found a way to prevent this happening though. There is > a site who downloads the files and once it is confirmed that the file is > really what was claimed and probably it fullfills some other quality > constraints, it is put in a database for everyone to see. This BitPrint seems to be built around that concept. The company that created it might have even been trying to get into the business of running these databases. > Furthermore, > since the system uses a URL-scheme to easily select files of interest, > you can simply create a link like a http-link and users of this > p2p-software can just click and get that file hash added to their "to > download list" - which is a very clever and quite comfortable way. For xBin on usenet, the Message-ID of any article posted under the system acts as a unique identifier for that file. (uniqe to 60 bits hash+file length) which I believe is large enough for this purpose). If you post an xBin file to any group on usenet (including alt.binaries.everythingxbin), to announce the file to the world, all you have to do is post a text message somewhere and say: I posted song.mp3 as <$XB$Hx/I8REUBPH$SEoJr$oAA$sBa$$3mK@xbin.org> One Message-ID is all the download to tool needs to find the post and download it for you. If the download tool gave you the power to read text messages, and gave you the power to click on xBin Message-IDs to add the post to the download list, then it could be a convention that people would post all there announcemnts in a .d group, and post the 1000 part posts to a .x group that nobody every bothered to read or download headers from. The download tools would simply download all the Message-Ids from the .x group and use that to find all the posts, and reposts as required. For that mater, the announcement of the post should have the same xBin file signature in it's Message-ID so it could act like a part 0 post where the part 0 post was posted to the .d group and the data was posted to the .x group. So then instead of having to put the Message-ID into the text, the article would just be an announcment of the post. The download tool would see that the article had an xBin Message-ID, so it would activate the "Download This File" button when you read the message. And the newsreader would also be able to show you the size of the file since it too is in the Message-ID so you know how big of a file you are asking to be downloaded. So, if you want the file, you just click the DownLoadFile button, and the download tool adds that xBin id to the list of files it's downloading parts for. None of the parts even have to be on the server yet, the tool will simple add to it's list of "things to download" and for something huge, that might be posted as 100 articles every day for the next week, the tool will just keep collecting the pieces as they show up. Having a download tool that could spot Xbin Message-IDs in the text of a post would allow people to build indexes of everything posted to Usenet recently so you could read the one index article and click on things you wanted to download. Or, maybe the idea of posting a set of files and listing the xBin ids of each file in the set in one article would be good as well. A download tool could then have an option to extract all the xbin IDs from the text of the article and add them all to it's download list. Lots of things become possible when you can automate the job of locating file parts and download and deocode without having a human "step in an fix things" which is so commonly needed on Usenet now. > Yes, and this has prooven to work out well. However, if someone posts the > same file again BUT applies any transformation beforehand (he rar's it > with a different, never version) then the file he posts is of course > something different (bitwise compared) and it *will* get another file > hash. And some posters don't want people to know that the same file is being posted again, so they won't like the file-hash idea. But it should be easy for them to both use xBin and get around that by finding ways to make minor changes to the file. A 1 bit change anywhere gives it a new file-hash. It was suggested that the standard should allow for a random hash to be made up to allow people to that did not want their reposts to be tracked to still label their files with xBin but to get around the "fixed ID" issue they didn't no like. I think it would be wrong to allow that. To keep things simpler, I think xBin should only allow a "real" hash. There are plenty of ways to change the file or post it a different format (like ziped or rared etc) that would prevent it from being spoted for the people that care about that. > Ok, basically include the unique file-hash into the message-ID. Right. That makes the Message-Id not only uniquely identify the article, but it also uniquely identifies the file the article is a part of. > Maybe there is a clever way in propagating those tree-hashes but if so, > you didn't say that up to now and I don't see it directly :) As you have now seen in the other posts, this is exactly the point of the hash tree. It is the clever way of including the hash informaion for the file in every post in a compact form. > However that is hashing linearly. For tree hashing, you'd need to stop > after having reached a block and save that result, then continue until > there are all results. Then create the pair-hashes etc. However, the most > time gets lost seeking through the file, getting the "leave-hashes", > since once they are computed, you can leave them in memory and work over > them in memory only, which should be quite fast (even though you'd have > to compute (2^log n)-1 hashes, whereas n is the number of > blocks/leave-hashes) Yeah, is it turns out, the code isn't as bad is it might seem at first glance. If you want to calcuate the tree hash but not save the entire hash tree, then all you need to do is read hash-sized blocks from the file, calcuate the hash of the block, and maintain a list of hash values in an array going up to the root. Each entry in the array is either empty, or holding a hash value. Once you calcuate the hash for the block, you then scan the array. If you find an empty arry element, you store the hash there and stop. If the element is holding a previous hash value, you remove it from the array, hash it with your current hash value, and then proced to the next array element and repeat. You continue reading blocks, calcuationg hash values, and scaning your array combining the current hash with others already stored. After you finish the last block, you then make a final pass though the array and combine hash vales up to the top until you are left with only one which becomes the file hash. If you need to build and save the entire hash tree, I did by allocationg binary-tree nodes on the fly. You could also di it in an array using positional encoding. Or if you were worred about how much memory might be available to you, could could calcaute the hash values in-core using only the small array as talked about above, but the write out every hash value as it is calcuated to a file. The position of each hash value could be found in the file later by it's position. I'd have to think a little more about that, but I'm sure it would work. > Once the blocksize is set, the newsposting software knows it wants to > post nnn blocks with each block being xxxx bytes large. The article > length of each article in such a sequence will vary of course - but > that's no change from what it is today, is it? The other things that is "good" for usenet that is not commonly done is to try and equlize the size of all the articles in one multipart post. Articles tend to get filtered by size, and they tend to move faster or slower though Usenet based on their size. If all the articles for one multipart set are the same size, it imporves the odds that they will all make it to the same servers, at about the same time which improves the odds they they will expire at about the same time, and expire in the same order hey were posted. Today, the last article is very often substantically smaller. These tend to move faster though usenet, and tend to make it to servers that the large articles might be filtered from. And because they move faster, they can sometimes show up first even though they were posted last. And then, because they showed up first, they expire first, leaving an incomplete set of "large" articles on the server and leaving users wondering why the small articles were "lost". The larger the block size you choose for the hash, the more variation you have from file to file in size, and the more problems you have like we already see today. > > To demonstarte the format it's using, I just posted a small 3 part mp3 > > file to Usenet. Here are the important headers added to the first of > > the three parts: > > > > X-Bin-Signature: x/I8REUBPHGJ+qcCiUb3TXz4Z80 > > pRnksBkZcSiccM1/hkrWdEBd7u0 x+m6b4q/02G04s29ZNPQcRMToMg > > j/3IFK3di5igu5Z7KpjDoIkN33I 0MFRwrdF1rCYmcW5qCcs0+fM0B8 > > yiZ65jmF1sZjCiHjUoKzBd75Wgw > > Message-ID: <$XB$Hx/I8REUBPH$SEoJr$oAA$sBa$$3mK@xbin.org> > > > > The X-Bin-Signature: is the tree-hash data needed to verify the data in > > the article. The hash is encoded in base64. The first value is the > > full tree-hash for the file. (the one that starts with x/I8...) > > What exactly is the rest of the X-Bin-Signature containing? I assume its > some of the tree-hashes but in what order (upwards towards the root from > this node?) They are the hash values for the rest of the file which is not included in the post. They are the highest level nodes from the binary hash tree which do not overlap with data in the article. Each hash value in the signature is the hash value for a set of blocks from the full file and each hash will cover a range of blocks which is a power-of-2. If the hash blocks in the file are numbered starting with 1, and the article we are looking includes blocks 14 though 18, the first hash in the signature is the hash for the first 8 blocks (1 to 8), the next hash is for the next 4 blocks (9 though 12), and the next hash is for block 13. The remain hash values cover the rest of the file after the segment included in the article. Those hashes represent the highest levels of the hash tree you could calcuate using the data _not_ included in the current post. To verify the data in the post, you then use those hash values, and the data in the post, to finsh the hash tree calculation. If you finish the calculation, and end up with the correct file hash, you know the data in the post is valid, and you know for sure that it came from a file who's tree-hash matches the one listed in the Message-ID. > > What's left to do is write a article verifiying tool - first to show it > > can be done and second - to veryify that what my posting tool is > > produceing is even valid. > > I'm currently working on a personal Java programm that fetches news for > me more or less autonomously. (Don't worry Curt, I haven't let it run > loose on your servers yet, I'm testing it with my local leafnode > installation ;-) ) No problem. You can't really do much harm if you are aren't posting. If there's anything I can do from my side to help with our code let me know. > At the moment it can connect to a server, issue the > "DATE" and "HELP" commands, get the reply and quit. It's a free time > project though and I don't know how much I'll be working on it over the > hollidays and silvester. > > IF there is a specification (you already gave about most of it I think, > though some questions remain) I can programm something that tries to > understand that format. However I gladly let anyone step forward who > "really really wants to do it now" (tm). The only spec I have right now other than these posts is the code. But if this to go somewhere, I'll be happy to work on a more formal definition and put it on my "nothining here yet" xbin.org web site. > > Par file technology could be supported by this as well, but it would > > have to be built into the xBin standard to work correctly. That gets > > complex. > > Well every single file gets its own file-hash. So the par's could be > marked somehow "this is for filehash : xxxxxx" so you know that this is a > par-file which belongs to the file with the corresponding file-hash. > However, if people will still post their files splitted in nn-parts (r00, > r01...) then each of these rNN-parts will get its own file hash uniquely > identifying it. That WILL get a mess then... and if people start to post > the full file as one segment with Xbin, then this becomes incompatible > with the par-system (since the par's must be as big as the original > segments - if there is only one segment you have one big file and one > just as big par-file ? Don't think so.) Well what you have to do is logically treat the one huge file as if it were split up into fixed sized segemets even though it is not. Just like par got built into winrar to work better, the reed solomon codeing would have to get built into the download and posting tools to really work correctly with this. So you would post the full file with any part size you want to. Then you have a tool that can calcuate and post PAR segments which don't need to be based on the origianl file split at all - but they could be and it would be usefull if they were. You then post PAR "segements" which are used to replace missing articles. But 8 bit Reed-Solomon coding is limited in the number of "files" it can protect. It think that number is 128 or 256. Or maybe it's actually that the number of data files + the number of par files you want post has to <= 256?? And if you are posting large files as one huge multipart posts (which is they way it should be done), then you will end up with posts where a single par post will not cover all the articles. But that's not a problem, you just post rar files which cover the parts 1 to 128, then another set of rar files to cover parts 129 to 256, etc. This gets confusing for the person trying to download, but the point is that all this needs to be made automatic so the person downloading doesn't have to understand which parts they have missing and which par files they need to use to fix it. The par file segments need to have special xBin Message-IDs that indicate they are par files, and which document eactly which par file it is and what parts of the full file the par file is "protecting". The download tool would then be smart about par files and be able to figure out on it's own if the par file could help it fill missing gaps in the file. The user wouldn't have to think about it. As far as posting par files, what would work best is to automate the re-post requests so the people who were missing parts could post a re-post request which is machine generated and machine readable to cleary document all the segments the person was missing (and for a 1,000 part post, that may be alot). But the re-posting tool could look at a request and figure out what par files, and how many par files are needed to fill the request and only post what was needed. But before something like that is in place, people for now will just continue to do what they have been doing. They can split the large files up, and post rar and par files. xBin won't help them get the full set, but it will help get the peices of the rar files and it will help prevent forgeries from causing the problems they cause now. > > The other dream of xBin is to "fix" posting so that people would no > > longer need to break huge files into lots of small rar files (or master > > spliter or whatever). It would allow you to post a huage file as 1000 > > parts if that is what it takes. > > Yes that would be recommended, however that comes at the cost of breaking > par-style parity files. However, you could simply re-get/post the missing > blocks. > > This definitly needs to be tested thoroughly.... > > > All this stuff is a bit complex. It might prove to be too complex for > > Usenet. But I think it could make multipart posts work a lot better > > than > > Not too complex I think. In the end its "just" another way to mark posts. > Actually to make them more system-readable. The logic and complexity > remains completely in the end-users news-application software. It > shouldn't bother the newsservers at all, though they might take advantage > of it, once it is used widespread (automatic processing for webfrontends > or something like that comes to mind). Right. That's the goal. You make the binary files more system-readable so the software can deal with the files instead of making the users do so much by hand to deal with the problems that keep showing up. It should give both the end-users/admins/software developers a lot more options than we currently have to deal with binary file problems, and to add new features to help support binary files better on Usenet. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20021224024147.474$RX@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!news.maxwell.syr.edu!feed2.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <20021223103532.803$lt@newsreader.com>Show Full Headers
Complete Article Headers
Message-ID: <20021224024147.474$RX@newsreader.com>
Subject: Re: xBin (Power-Post 2003 - requesting input from authorities..)
Date: Tue, 24 Dec 2002 07:41:47 +0000
From: curt@kcwc.com (Curt Welch)
References: <cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <20021223103532.803$lt@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!news.maxwell.syr.edu!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 CzltJo0HH3jC1O4aLH0FS@H+ja1v9q7puEzfw8__FdwU-zm
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: 350