🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
107 messages
107 total messages Page 2 of 3 Started by Nunya Biznis Mon, 18 Mar 2002 19:29
Page 2 of 3 • 107 total messages
Re: Using Message-ID to store binary file information
#57481
Author: Nunya Biznis
Date: Thu, 21 Mar 2002 01:58
28 lines
3131 bytes
On Wed, 20 Mar 2002 20:33:59 -0500, "J.B. Moreno" <planb@newsreaders.com> wrote:

>In article <3c98fde3.12974801@news>,
> =-lordsnow-= <lordsnow@home.nl> wrote:
>
>> > I'm still somewhat skeptical about doing a MD5 or a CRC based upon the
>> > fact that you have to scan the article twice -- I'm not sure how long
>> > that would take.  You're using a 500 mb file below as an example, how
>> > long would it take to read that and compute an MD5 for it?
>> 
>> Unless you have a REALLY slow PC, then it's the IO (disk read) that's
>> going to affect the time it takes. Fast HD's are 15-20MB/s at the
>> moment, so just reading it will take about 35 sec.
>> 
>> MD5 would take about 5sec, on a P850. CRC32 is a little faster.
>> 
>> i.e. rough estimate: about 40sec in total.
>
>Well, I have a really old computer, and a slow connection (not even
>28.8), so I don't have a good feeling for that would mean: with a
>broadband or ASDL connection how long would it take someone to post
>without having to do a first pass?

With any of the commonly-available consumer broadband
connections, I'd guess a 500mb post would take several
hours.   IMO, the extra 40 seconds is insignificant.

Re: Using Message-ID to store binary file information
#57482
Author: Curt Welch
Date: Thu, 21 Mar 2002 02:53
39 lines
3297 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <3c98fde3.12974801@news>,
>  =-lordsnow-= <lordsnow@home.nl> wrote:
>
> > > I'm still somewhat skeptical about doing a MD5 or a CRC based upon
> > > the fact that you have to scan the article twice -- I'm not sure how
> > > long that would take.  You're using a 500 mb file below as an
> > > example, how long would it take to read that and compute an MD5 for
> > > it?
> >
> > Unless you have a REALLY slow PC, then it's the IO (disk read) that's
> > going to affect the time it takes. Fast HD's are 15-20MB/s at the
> > moment, so just reading it will take about 35 sec.
> >
> > MD5 would take about 5sec, on a P850. CRC32 is a little faster.
> >
> > i.e. rough estimate: about 40sec in total.
>
> Well, I have a really old computer, and a slow connection (not even
> 28.8), so I don't have a good feeling for that would mean: with a
> broadband or ASDL connection how long would it take someone to post
> without having to do a first pass?

ADSL is slower uploading, but I don't know what numbers it actually
gets.  But for someone with an effective rate of 500 Kbit upstream
you have 500MB * 8 b/B / 500 Kb/s = 8192 seconds or 2 hours 16 minutes.

Having to wait 40 seconds before starting a 2 hour post is not
going to be a real problem.

If you had a 10 Mbit connection, it would still take close to 7 minutes
to upload (assuming the news server you were posting to allowed you
to send that fast), so even then a 40 second deal would not be
a killer.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: yenc - has anybody else noticed this?
#57483
Author: Curt Welch
Date: Thu, 21 Mar 2002 03:55
72 lines
5044 bytes
Agent-user@Coises.com wrote:
> [follow-ups set to auorfa, since I'm not reading news.software.nntp]

news.software.nntp added back since I'm not reading auorfa. :)

> Also... when using an encoding scheme where the number of encoded bytes
> is not a function only of the number of file bytes (which I gather is the
> case with yEnc), isn't it necessary to encode the whole file first to
> know how many parts the result will contain, so as to post a proper
> subject?

It is required if you want to make sure that every part is exactly the
same size, but since expansion is fairly constant and small (3%), you
don't need to worry about it in practice.  You just divide the source file
into the correct number of parts and ignore how much each part actually
expands.  So a 10MB file can be divided into 20 500K chunks and each chunk
encoded and then posted.  The article to article size difference isn't
enough to care about for real-world files. So you don't need to pre-scan
the file to get the part count in the subject correct.

> I would like to suggest what I think would in practice be a much simpler
> mechanism

  [require a 0/N post which lists the messages Ids and post all
   the parts as a follow-up to the 0/N post]

This type of idea has been suggested a few times.  The big concern
is that it opens a wide door to abuse.  Because the 0/N moves faster,
it would be trivial to anyone looking to cause trouble, to post
N small messages with the IDs listed in the 0/N article.  They could
even be posted elsewhere - like alt.test.  They would quickly flood
though Usenet and block all the real posts from being distributed.

Posting the 0/N part last doesn't solve the problem because it will still
move though the net faster and pass some of the other parts.  Trying to
delay the post of the 0/N only makes it harder for people to download the
post because they have to wait for the 0/N to show up.

> 6. Reposts of one or more parts (whether by the original poster or
> someone else) should include a preface message which should be posted as
> a follow-up to the original preface message.  The reposted part(s) should
> be posted as follow-ups to the repost preface message.

There's something else you are not thinking about that we have been
trying to address.  If you identify the file with a hash (like an MD5),
then newsreaders can take advantage of a re-post which happens by
accident, even if it happens in another group.  Everything on Usenet
keeps getting reposted time and time again.  If you don't get it all the
first time, it would be very nice for your newsreader to keep a list of all
files which it had partial downloads for, and watch for a repost even
if it wasn't done to "fix" the orginal post.  i.e. we want newsreaders
to be able to find re-posts even when they have nothing to do with
the previous post.

Your system of using Messge-Ids as {multipart-ids) would not help us do
that.

> This could also be used for reposts in which the division into parts is
> not identical to the original; however, unless contiguous ranges of
> replaced bytes are exactly matched by ranges of (perhaps unequal numbers
> of) parts from the original, receiving clients would have to be modified
> to be able to make use of such reposts.

Yes, I have been talking about features which no receiving client will
currently be able to make use of.  They will all have to be modified.  But
I'm talking about adding the features in ways which will not break any of
the existing clients from doing what they have always done.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: yenc - has anybody else noticed this?
#57485
Author: Coises
Date: Thu, 21 Mar 2002 04:10
24 lines
2361 bytes
[21 Mar 2002 03:55:05 GMT] Curt Welch:
>This type of idea has been suggested a few times.  The big concern
>is that it opens a wide door to abuse.  Because the 0/N moves faster,
>it would be trivial to anyone looking to cause trouble, to post
>N small messages with the IDs listed in the 0/N article.  They could
>even be posted elsewhere - like alt.test.  They would quickly flood
>though Usenet and block all the real posts from being distributed.

Oh, ick.  :-(

I never though about intentional interference.

I suppose it isn't always a beautiful day in the neighborhood, is it?
Good point --- and probably a good reason such "simplicity" (which,
I admit, is only applicable for some values of "simple") won't work.

Being kind of "Luddite" (hell, I drive a '78 Buick!), I'm usually looking
for solutions that offer benefits even to those who don't change anything.

Suggestion, such as it was, withdrawn.
-- 
Peace, Randy@Coises.com
Pages at http://www.coises.com/ were updated 5 March 2002.
Re: Using Message-ID to store binary file information
#57486
Author: J.B. Moreno
Date: Thu, 21 Mar 2002 04:14
251 lines
12797 bytes
In article <20020320174111.780$V8@newsreader.com>,
 Curt Welch <curt@kcwc.com> wrote:

> "J.B. Moreno" <planb@newsreaders.com> wrote:
> >  Curt Welch <curt@kcwc.com> wrote:
> 
> > > Ignoring the slippery slope problem of putting anything into
> > > Message-IDs, what would you suggest putting in there for binaries?
> >
> > Well, first and foremost -- that it's a binary.  Then the size.  Then
> > something that is reasonably compact and unique to the file so XPAT
> > searches can be done looking for individual parts.
> 
> Ah, XPAT searches.  I hadn't thought about that. That's another potential
> benefit.
> 
> But even without XAPT, just doing a XHDR message-id to dump the IDs for
> an entire group is something that works today on all servers (I suspect)
> and would give a binary download tool all the info it needed to locate
> potential articles for missing parts (if this was a standard which was
> all of Usenet was converted to at some point).

And it's also in XOVER.

> > Number of parts.
> 
> I think we need to get away from that.

Why?  Are reposts requests (and fills) really a problem?

> > > You could throw in the segment offset and size:
> > >
> > >          so=3Hw6,ss=y7J
> >
> > What benefit do you expect to have from having the segment size and
> > offset included in the Message-ID instead of elsewhere?
> 
> Well, to start with, we need to move away from the idea of part counts
> or part numbers and move to the idea of byte ranges to allow newsreaders
> to correctly find the segments they need to fill in holes.  This is needed
> to replace the idea of part number so reposts no longer have to match
> the size of the orginal post.

Well, you could do both -- use one set of info for original posts, and
another set for a reposts (which makes sense to me).

> When I started to write my article, I assumed that we couldn't put
> eveything in the ID (it would make the ID too large) so we would just
> put a few thigns that was most useful (like the full size of the
> binary the segment was a part of).  But by the middle of my article,
> I realized it was actually possible to put everything that was needed
> into the ID and still keep the Message-ID a resonable length (long,
> but not unworkably long).  So if we have completly elimited the need
> to add other headers or to hide data in other parts of the header,
> why not put it all in one place?  That was what I was thinking.

Well, you won't completely eliminate the need to add other info -- the
file name simply can't be put in there.

Anyway, I think that mainly what you want to do is help with the
building of the article list.

> If you put all that stuff in the ID, then the newsreader has
> everything it needs to find articles without having to do XHDR or
> HEAD commnds.  You could move that stuff into a fake id in the References
> and still have it show up in XOVER, but then then the nice trick of a
> single XHDR command to get everything you needed would not work.  You would
> have to do two and get a lot of "real" References: data for the text
> articles that you cared nothing about.  Putting it all in the ID seems
> generally cleaner to me.

If you can fit it in without making it too large, I'm all for it (and
of course "too large" for binary posts isn't quite the same thing as it
is for most text articles).

> There is other information needed as well, like file name, and checksums
> for the article, but that can all be dealt with how it's done now with
> the various standards (MIME, uuencode, yEnc).  Those are things the
> newsreader would need to know until after it started downloading the
> articles.  And the subject alone is all the user needs to decide what to
> try to download in the first place.
> 
> If moving things like offset and part size into the Refferences section
> to prevent excessive bloat in Message-IDs makes sense, that could be done.
> 
> But once I realized that we could but everything that was needed into
> the ID and not worry about any other new headers or tricks it seemed
> to make more sense to me.

What all do you think should be put into the ID?  The name is out, but
what else?

> > I'm not suggesting that all of the binary information be presented in
> > the Message-ID, just those parts that you want to have as quickly and
> > easily as possible.  Above I mentioned encoding method, but only
> > because it might help with filtering (and deciding what encoding
> > methods to support).
> 
> Putting encoding method in there could help.  But it kinda implies
> that we want to support lots of different methods.  And it creates
> the complexity of adding new names later for other new encoding
> systems.  You could attempt to kill that by defining only uuencode,
> MIME, and yEnc and say that all new methods MUST be done as MIME
> or not done at all.

I'd say they have to come up with a 3 letter abbreviation and leave it
at that -- "uue", "b64", "yen", "qpl".

In any transition period in the future for encodings, it'll be handy to
have a way of filtering out the stuff that you can't yet handle (and in
fact it's liable to be useful for the immediate future as people
continue to use tools that can't handle yenc).

> But to be honest, I'd rather just leave the encoding method out and
> not make it "easy" to support many standards - to encourage the net
> to move to one standard (whatever that is).

In moving to one standard, it's essential to get good data on what is
currently happening -- last year when yEnc was being discussed, I saw
several people say things like "Base64 is the norm" or "Most binaries
are encoded using base64", while I couldn't find a single article where
the encoding was B64; and I didn't know if that was my fault or they
were wrong.  In fact I still don't know.  It seems to me from my own
snooping around, that the vast majority of files are encoded using UUE,
but that could very well be a sampling bias.

Part of the argument against yEnc has been that it is yet another bad
encoding that will linger on -- if so, that will be in part because
there's no way to tell if it's time to kill it off.

> > Well, as you say, you'd want to use base64 so both of the above would
> > be somewhat smaller, and you're right that you probably don't need (or
> > want) the full MD5 hash.
> 
> Some research could help determine how many bits are really justified
> and what algorithm is the best for giving us those bits.  But if everything
> is encoded with base64, then a total which is a multiple of 6 would
> be logical.

Sounds reasonable.

-snip md5 scan before posting a problem?-
> I don't see the time for the scan being a killer as long as we kept
> with a hash fucntion that was a lot faster than the disks.  MD5 is
> nice because it is so fast.

OK.  Sounds sensible to me.

> > What about including the information on the RHS instead of the left?
> >
> > <date-stuff@uJb8Ex.A900.ubin.invalid>
> >
> > (ubin meaning usenet binary).
> 
> It's an option.  But I believe some people in the past felt they wanted to
> keep the RHS a real domain name and even allow their server to change the
> RHS of a user supplied ID.  I don't know if any server is actually doing
> that today.

Probably because they wanted to keep the LHS -- but I don't believe it
matters as I don't think any servers are doing that.

> It doesn't really save much in terms of bytes in the Message-ID.
> 
> Base64 needs two characters other than letters and numbers.  MIME uses
> + and /.  That's likely to cause problems on the RHS. We could use - and
> something else (what else would be used?).  Or stick with hex or make
> up a base32 encoding.

Is = or ! allowed?

> And domain names are case insensitive and there's always been an old
> hanging issue of whether <1@TEST.COM> should be treated as equal to
> <1@test.com>.  Even though most news servers would treat those two IDs
> has being different, I think in theory they "should" be treated as
> equal.  This issue could get in the way of puting base64 on the RHS
> but wouldn't stop base32 or hex from working.

I disagree: Message-ID's are case sensitive -- domain names may not be,
but Message-ID's are a different matter.  They may have the same
structure as email addresses but they are NOT email addresses, and case
should count.

> > while at the same time reducing the size of the required message-id.
> 
> <date-stuff@uJb8Ex.A900.ubin.invalid> is really not much different than:
> 
> <date-stuff$ubin=uJb8Ex.A900@shortname.com>
> 
> Most of the size savings from my examples only happend because you left
> half the data I put in there.  And you leave out a valid domain name
> which I think some admins might not like.  But it's an option to think
> about.
> 
> Using the RHS for the hash and the size makes XPAT searchs a lot
> easier doesn't it?  As in:
> 
>   XPAT Message-ID 1- *@uJb8Ex.A900.ubin.invalid>
> 
> But, I guess that's really not easer than:
> 
>   XPAT Message-ID 1- *$h=uJb8Ex$s=A900$*

No, not a lot -- but if the domain name isn't short, it could make
quite a difference.

> > Well, if you used the RHS and allowed "invalid" to be replaced with the
> > actual host name if the server required, they might change the way they
> > generate message-id's.  Or simply make an exception for labeled
> > binaries.
> 
> Good point, the standard could all be defined in the context of doman
> names so people could replace invalid with a real domain:
> 
>    <date-stuff@huJb8Ex.sA9000.o3443.lA900.ubin.isp.com>
> 
> If we get enought people to think about this, we could figure out what
> made the most sense - i.e. what was the most flexible and caused the
> least problems.

Yeah, but I've tried to get people interested in this at least a couple
of times, but haven't seen a lot of responses...

> The more complex issue is what should or should not be put in there
> and if we should even consider this at all.  Figuing out the best format
> is not the hard part.

Agreed, but without some discussion taking place noone is going to
consider it.

> > > It's also 100% compatible with all current formats used for posting
> > > binaries to Usenet (uuencode, MIME, or yEnc) -- as long as you include
> > > only one file or file segment in each article.
> >
> > And since that is the case in the VAST majority of articles, I think
> > that any loss in ability to do multiple files in one article is quite
> > acceptable for the benefits received.
> 
> Maybe for those that wanted to put multiple binaries in a file we could
> even define a "correct" way to code it.  For example, just by encoding
> it as if it were one big file made up by concatenating all the small
> files together.  The total size would still be valid and useful in that
> case.

Yeah, that makes sense.  Really, it's basically what happens now when
instead of using multiple files they use some sort of utility to
combine them -- zip or tar or whatever.

-- 
J.B. Moreno
Re: Using Message-ID to store binary file information
#57495
Author: Curt Welch
Date: Thu, 21 Mar 2002 07:28
63 lines
4671 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <20020320174111.780$V8@newsreader.com>,
>  Curt Welch <curt@kcwc.com> wrote:

> > > Number of parts.
> >
> > I think we need to get away from that.
>
> Why?  Are reposts requests (and fills) really a problem?

I was just talking about newsreaders using the part number as
if it were something importnat.  If they had access to byte ranges
part numbers would not be important any more so there's little
point in placing it in the Message-ID.

i.e., I was saying we should replace part number with byte range
information as the key item the new newsreaders used to join
parts.  Part numbers would still show up in the Subject like they
do now for full posts.  I'm not sure what would be for a partial
re-post which was done in different part sizes.

> Well, you won't completely eliminate the need to add other info -- the
> file name simply can't be put in there.

There is no need to add other info.  The file name will be in the subject
so that's all the user needs to figure out.  And it will be be in the
"normal" place it is now (begin line, ybegin line, or MIME headers).

The reason we are looking at putting this info someplace is so that
newsraders can find missing parts -- including when the filename is
different.  If the newsreader has a good hash (partial MD5 + length), and
the byte range, then that's ALL it needs to figure out what articles to
download.  It doesn't care what the file name is and can find that out when
it downloads the full article.

Sure there's more usefull information about the file like it's name and
content type but that's not the stuff I'm been trying to figure out how to
get into the headers so it's not needed in the Message-ID and it's not
needed anywhere in the headers other than it's traditional location in the
subject.

The only questionable item in my mind is the hash.  Is a small number (like
36) bits in the Message-ID good enough (when combined with the file size),
to correctly identify article parts?  Or do we need something like a full
md5 in the headers as well?

The newsreader may save a downloaded file with missing segments for a very
long time (a year for example) and check all articles downloaded in a group
to see if the missing segments ever show up.  Is a 36 bit hash + the file
length good enough to prevent the newsreader from getting a false postive
match and downloading a segment which it thinks is what it was looking for
when in fact it is not?  This is what we would want to prevent - or at
least reduce to a point where it was very uncommon.

If the 36 bit hash wasn't good enought for that, we could add more bits
in the Message-ID.  But if that was just too many characters for the
Message-ID, we would have to put those bits some place else. So then
the question becomes, once again, where?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: yenc - has anybody else noticed this?
#57496
Author: Jeffrey M. Vinocur
Date: Thu, 21 Mar 2002 07:55
28 lines
2022 bytes
In article <a7b12h$4ba$1@wonderland.linux.it>,
Marco d'Itri  <abuse@1.2.0.1.0.0.1.e.f.f.3.ip6.int> wrote:
>lordsnow@home.nl wrote:
>
>>> If the file size is known then the MD5 attack cannot be done.
>>So... what you're saying is: it IS possible that two files will have
>>the same MD5, but only when they're not the same size?
>Yes, at least as far as is currently known.

Clearly that's not possible.  For any n, there exist n files with
the same MD5 hash, all of the same size (that size may be large,
especially as n grows).  The proof is trivial by pigeonhole
principle.

Perhaps what the original poster above is saying is correct?
That there is a non-brute-force method of producing a file with a
particular MD5 hash, but that method does not work if the file
must be of a specified size.

(I don't know if that is true or not.  But is that what you're
saying?)



-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Using Message-ID to store binary file information
#57499
Author: A Meowbot
Date: Thu, 21 Mar 2002 08:33
12 lines
1809 bytes
Curt Welch wrote:
> lordsnow@home.nl (=-lordsnow-=) wrote:
> > If I'm not mistaken, the author of NewsBin Pro recently told me that
> > some servers calculate the M-ID.
> 
> Yes, that's correct.  But "some" I believe is something like 2.  And that's
> not 2 "brands" of news server software, that's 2 servers total in the
> world.

The option to use this behavior is built into diablo's reader k0dez, 
though it doesn't seem to see much use other than by sol.net.
Re: yenc - has anybody else noticed this?
#57503
Author: Marco d'Itri
Date: Thu, 21 Mar 2002 10:50
15 lines
1569 bytes
jeff@litech.org wrote:

>Perhaps what the original poster above is saying is correct?
>That there is a non-brute-force method of producing a file with a
>particular MD5 hash, but that method does not work if the file
>must be of a specified size.

>(I don't know if that is true or not.  But is that what you're
>saying?)
Yes. This is what I understand by reading the PGP FAQs.

-- 
ciao, |
Marco | * The Internet is full. Go away.  -- Joel Furr *
Re: Using Message-ID to store binary file information
#57513
Author: J.B. Moreno
Date: Thu, 21 Mar 2002 17:24
40 lines
3510 bytes
In article <20020321022856.582$dC@newsreader.com>, 
 Curt Welch <curt@kcwc.com> wrote:

> The newsreader may save a downloaded file with missing segments for a very
> long time (a year for example) and check all articles downloaded in a group
> to see if the missing segments ever show up.  Is a 36 bit hash + the file
> length good enough to prevent the newsreader from getting a false postive
> match and downloading a segment which it thinks is what it was looking for
> when in fact it is not?  This is what we would want to prevent - or at
> least reduce to a point where it was very uncommon.
> 
> If the 36 bit hash wasn't good enought for that, we could add more bits
> in the Message-ID.  But if that was just too many characters for the
> Message-ID, we would have to put those bits some place else. So then
> the question becomes, once again, where?

Well, I was thinking that the main purpose of this would be:
   a) allow both servers and clients to know that it was a binary

   b) allow clients to easily find CURRENT missing parts on other
servers and to improve their grouping/threading by getting away from
the confusion in the Subject (possibly even dropping part numbers from
the subject).

   c) allow servers to improve their handling of binaries (for
instance, expiring all parts of a binary at once, expiring based upon
total size, accept or reject articles from their peers based upon size
and/or binary status).

So, as long as the ID was unique and could associate parts during their
"active" life, that was good enough for me (for instance, if MD5 had
been a bottleneck, I was thinking of proposing that the MD5 be only on
a part of the file).

If you want to allow a more long term solution, it seems to me that
what you'd want is a full MD5 in the References header.

-- 
J.B. Moreno
Re: Using Message-ID to store binary file information
#57516
Author: Curt Welch
Date: Thu, 21 Mar 2002 17:51
91 lines
6426 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <20020321022856.582$dC@newsreader.com>,
>  Curt Welch <curt@kcwc.com> wrote:
>
> > The newsreader may save a downloaded file with missing segments for a
> > very long time (a year for example) and check all articles downloaded
> > in a group to see if the missing segments ever show up.  Is a 36 bit
> > hash + the file length good enough to prevent the newsreader from
> > getting a false postive match and downloading a segment which it thinks
> > is what it was looking for when in fact it is not?  This is what we
> > would want to prevent - or at least reduce to a point where it was very
> > uncommon.
> >
> > If the 36 bit hash wasn't good enought for that, we could add more bits
> > in the Message-ID.  But if that was just too many characters for the
> > Message-ID, we would have to put those bits some place else. So then
> > the question becomes, once again, where?
>
> Well, I was thinking that the main purpose of this would be:
>    a) allow both servers and clients to know that it was a binary
>
>    b) allow clients to easily find CURRENT missing parts on other
> servers and to improve their grouping/threading by getting away from
> the confusion in the Subject (possibly even dropping part numbers from
> the subject).

Yes, but "CURRENT" must extend over a few days.  One thing that a lot of
download tools don't do well know is deal with posts that take days for
all the parts to show up - and what they deal even worse with is servers
with short retention where the first part of a big will will expire before
the last part shows up.  One reason people split the huge files into lots
of smaller files (rar like) is to allow each small file to be seen in full
and downloaded.  With these new tools, it would be possible to post a 5000
part post over a period of two week.  You tell your newsreader to start
downloding when you see the beginning of the post, and it just keeps
downloading parts for days.

Once you have that type of tool working, people will naturally just let
it keep searching for parts forever if they are missing 5 segments out of
a 5000 part post.

To make this useful, we need to make sure the odds of the newsreader
downloadig a segment from some other post by accident is very very small.

Putting a hash which only works well for short term searches (days), but
not strong enough for a long term search (years) would be a shame.  It
would mean the newsreader could not automatically grab parts and but them
in the download list because the odds of being bogus would be too great.
The user would have to manually verify everything and the tool would need a
complex interface for letting the user try segments which he thinks might
be the same file but then reject them when it produces a bogus file etc.

>    c) allow servers to improve their handling of binaries (for
> instance, expiring all parts of a binary at once, expiring based upon
> total size, accept or reject articles from their peers based upon size
> and/or binary status).
>
> So, as long as the ID was unique and could associate parts during their
> "active" life, that was good enough for me (for instance, if MD5 had
> been a bottleneck, I was thinking of proposing that the MD5 be only on
> a part of the file).

Yeah, I had thought of that as well.  Just something simple like the first
1MB and the last 1MB of the file would probably have been a useable
hack.

> If you want to allow a more long term solution, it seems to me that
> what you'd want is a full MD5 in the References header.

Full MD5 would be "safe".  But it's a lot of bits to put into every header
of a mutlipart post if it's not needed.  Even if it's in the References:
header, it will still have to be downloaded in Xover:.

But then again, 128 bits in Base64 is only 22 characters.  It's such a
hack however putting these things in these places.  If you put everything
you needed in the Message-ID, it's a cleaner hack.

If you can't put enough hash bits into the Message-ID to make it work well
for long term searches then maybe it's better to just add a new header
for the MD5 of the file?  That way, the newsreader can find the files
using the Message-id, but then just do a head on the segment to find the
full MD-5 to make sure it's really the correct file before downloading?

But first, we would need to figure out how many bits are really needed.  If
you have the file size to check as well, what's the odds of false positive
with a 36 bit MD5 based hash?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57520
Author: Klaas
Date: Thu, 21 Mar 2002 19:52
17 lines
2161 bytes
Curt Welch <curt@kcwc.com> wrote in message
news:20020321125143.414$Wp@newsreader.com...

> But first, we would need to figure out how many bits are really
needed.  If
> you have the file size to check as well, what's the odds of false
positive
> with a 36 bit MD5 based hash?

I don't know.  However, if the potential article was downloaded and
the filename matched, you'd have a virtual guarantee.  Or do you want
to get completely away from using filename as a matching tool?

-Mike


Re: Using Message-ID to store binary file information
#57529
Author: Klaas
Date: Fri, 22 Mar 2002 02:23
33 lines
2534 bytes
=-lordsnow-= <lordsnow@home.nl> wrote in message
news:3c9c54a2.1953960@news...
> > I don't know.  However, if the potential article was downloaded
and
> > the filename matched, you'd have a virtual guarantee.  Or do you
want
> > to get completely away from using filename as a matching tool?
>
> If it was up to me, absolutely.
>
> Then people could name the files whatever they want. Repost it under
> different names. And others would still be able to correctly
identify
> them (and possibly automatically rename them to match the rest of
> their own set).

Okay, if we're going to rely on the MD5 for the complete
indentification of a binary file, we'd better get some reliable stats
on the likelyhood of collisions and how many bits we can get away
with.

> btw.. what's with the "Klaas" in your From: header? :))  It's a
common
> Dutch name, but you sig says "Mike"? :)

My name is Mike Klaas, I live in Canada.  I usually go by 'Klaas' on
usenet/irc, as it is less common than Mike.

-Mike


Re: Using Message-ID to store binary file information
#57530
Author: Curt Welch
Date: Fri, 22 Mar 2002 07:26
22 lines
2699 bytes
"Klaas" <spamhole@klaas.ca> wrote:
> Curt Welch <curt@kcwc.com> wrote in message
> news:20020321125143.414$Wp@newsreader.com...
>
> > But first, we would need to figure out how many bits are really
> needed.  If
> > you have the file size to check as well, what's the odds of false
> positive
> > with a 36 bit MD5 based hash?
>
> I don't know.  However, if the potential article was downloaded and
> the filename matched, you'd have a virtual guarantee.  Or do you want
> to get completely away from using filename as a matching tool?

That could be used.  But it really doesn't help much in dealing with
the fase postive problem because in that case, the file name most likely
won't match, but yet that won't help the program figure out what to do.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57531
Author: Curt Welch
Date: Fri, 22 Mar 2002 07:33
17 lines
2346 bytes
"Klaas" <spamhole@klaas.ca> wrote:

> Okay, if we're going to rely on the MD5 for the complete
> indentification of a binary file, we'd better get some reliable stats
> on the likelyhood of collisions and how many bits we can get away
> with.

Remeber that we are talking about a partial MD5 plus the file length.  So
we only need to figure out how likely it is for two files of the
same length to end up with the same N bits from an MD5 (or any hash
that works well).  How many files of the same length (but different
files) even get posted to Usenet in a year I wonder???

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57535
Author: Coises
Date: Fri, 22 Mar 2002 09:29
65 lines
4606 bytes
[22 Mar 2002 07:33:26 GMT] Curt Welch:
>Remeber that we are talking about a partial MD5 plus the file length.  So
>we only need to figure out how likely it is for two files of the
>same length to end up with the same N bits from an MD5 (or any hash
>that works well).

Assuming the hash "works well," it should be independent of the file
length.  The likelihood that two different files would happen to hash to
the same n-bit value would be 1/2^n.

The likelihood that two different files would have the same length would be
difficult to estimate a priori.  Let's see where we get if we omit that
factor and rely only on the hash.

The relevant question then is:
     Suppose, over some period of time, "k" *different* files are posted.
     What are the chances that any of those "k" files will have the same
     "n"-bit hash key?

The probability that the second file has a different hash key than the
first is  (1-(1/2^n)).  The probability that the third file has a different
hash key than the first is (1-(1/2^n)).  Etc... so the probability that
none of the other files have the same hash key as the first file is
(1-(1/2^n))^(k-1).  (We can multiply them like that because the probability
of any hash key colliding with the first is independent of the probability
of any other hash key colliding with the first.)

What about the second file?  Well, if the first file was clear, then we
already know that one hash value is taken, and can't be the value of any of
the other files.  So, given that none of the files collided with the first,
the probability that none of the files collide with the second is
(1-(1/(2^n-1)))^(k-2).  Given that none of the files collided with the
first two files, the probability is (1-(1/(2^n-2)))^(k-3) that none
collided with the third.  And so on.

We can multiply all *these* probabilities together because we've figured
each given that the previous condition held.  So the probability that all
"k" files have different hash keys is:

(1-(1/(2^n)))^(k-1) * (1-(1/(2^n-1)))^(k-2) * ... * (1-(1/(2^n-k+2)))^(1)

Yuk.

We can simplify that by noting that this value must be greater than:
     (1-(1/(2^n-k+2)))^((k-1)+(k-2)+...+1)
which is the same as:
     (1-(1/(2^n-k+2)))^(k*(k-1)/2)
which we can plug into a calculator.  The error (which will be on the
"safe" side) shouldn't be too large, since for any reasonable choice of
hash key length, 2^n will be much greater than k.

OK... let's try for, say, a 32-bit hash key and 10,000 files (for a year's
time, that would be a little over 27 files a day):
     (1-(1/(2^32-10000+2)))^(10000*(10000-1)/2)
in my handy-dandy calculator gives:
     0.988
which means the odds would be a little more than 1 in 1oo that some pair of
hash keys would collide.  Not bad... perhaps not quite good enough.


Math geeks are welcome to jump in and improve on the above.  :-)
-- 
Peace, Randy@Coises.com
Pages at http://www.coises.com/ were updated 5 March 2002.
Re: Using Message-ID to store binary file information
#57536
Author: Joe Newsreader
Date: Fri, 22 Mar 2002 13:54
14 lines
2345 bytes
On Fri, 22 Mar 2002 11:50:59 GMT, lordsnow@home.nl (=-lordsnow-=) wrote:

>I just had a thought:
>
>  CRC-32+file-length would distinguish between 2^32 files of exactly
>  the same length? (using CRC32 as an example - may as well be MD5).

I don't think so.  Have you ever heard the old conundrum about
"if you have 20 people in a room, what are the chances that 
two of them have the same birthday"?  The answer is "over 50%"

Joe

Re: Using Message-ID to store binary file information
#57537
Author: Andrew - Supernews
Date: Fri, 22 Mar 2002 14:04
27 lines
2566 bytes
In article <b8pl9u0lphocim3v2kj5r4ehaqpe27hhrs@4ax.com>, Coises wrote:
[chance of hash collision] 
> OK... let's try for, say, a 32-bit hash key and 10,000 files (for a year's
> time, that would be a little over 27 files a day):
>      (1-(1/(2^32-10000+2)))^(10000*(10000-1)/2)
> in my handy-dandy calculator gives:
>      0.988
> which means the odds would be a little more than 1 in 1oo that some pair of
> hash keys would collide.  Not bad... perhaps not quite good enough.
> 
> Math geeks are welcome to jump in and improve on the above.  :-)

this problem is known in the trade as the "birthday paradox".

(If you assume that birthdays are evenly distributed through the year, you
only need to get 23 people before you have a better-than-even chance that
two of them have birthdays on the same day.)

In general terms if you have N hash slots, the number of items K that
you need to have an even chance of collision varies as sqrt(N). Putting
that in binary terms means that you need at least twice as many bits of
hash as you might otherwise expect.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Re: Using Message-ID to store binary file information
#57538
Author: Joe Newsreader
Date: Fri, 22 Mar 2002 14:33
34 lines
3388 bytes
On Fri, 22 Mar 2002 14:04:29 -0000, andrew+nonews@supernews.com (Andrew - Supernews) wrote:

>In article <b8pl9u0lphocim3v2kj5r4ehaqpe27hhrs@4ax.com>, Coises wrote:
>[chance of hash collision] 
>> OK... let's try for, say, a 32-bit hash key and 10,000 files (for a year's
>> time, that would be a little over 27 files a day):
>>      (1-(1/(2^32-10000+2)))^(10000*(10000-1)/2)
>> in my handy-dandy calculator gives:
>>      0.988
>> which means the odds would be a little more than 1 in 1oo that some pair of
>> hash keys would collide.  Not bad... perhaps not quite good enough.
>> 
>> Math geeks are welcome to jump in and improve on the above.  :-)
>
>this problem is known in the trade as the "birthday paradox".
>
>(If you assume that birthdays are evenly distributed through the year, you
>only need to get 23 people before you have a better-than-even chance that
>two of them have birthdays on the same day.)
>
>In general terms if you have N hash slots, the number of items K that
>you need to have an even chance of collision varies as sqrt(N). Putting
>that in binary terms means that you need at least twice as many bits of
>hash as you might otherwise expect.

Andrew's value of 23 is the correct number of people needed to
get at least a 50% of a match.  The popular rendition of the
puzzle gives 20 by using reasoning that leads to simpler calculations,
but which incorrectly sums the chances of events that are not mutually 
exclusive.

Joe

Re: Using Message-ID to store binary file information
#57546
Author: Klaas
Date: Fri, 22 Mar 2002 20:27
26 lines
2310 bytes
Joe Newsreader <not@this.address> wrote in message
news:9sdm9u0amph7dp697grabpt68ptk6v4f3i@4ax.com...
> On Fri, 22 Mar 2002 11:50:59 GMT, lordsnow@home.nl (=-lordsnow-=)
wrote:
>
> >I just had a thought:
> >
> >  CRC-32+file-length would distinguish between 2^32 files of
exactly
> >  the same length? (using CRC32 as an example - may as well be
MD5).
>
> I don't think so.  Have you ever heard the old conundrum about
> "if you have 20 people in a room, what are the chances that
> two of them have the same birthday"?  The answer is "over 50%"

Actually, lordsnow is correct in that 32 bits of hash does distinguish
between 2^32 files.  However, each "file" is really an equivalence
class containing all files hashing to the same CRC, which means you
need much fewer than 2^32 files to be over 50% probability of
collision.

-Mike


Re: Using Message-ID to store binary file information -- Alternate probability calculation
#57549
Author: Klaas
Date: Fri, 22 Mar 2002 21:14
46 lines
2948 bytes
In reading Andrew's note I realized the birthday paradox formula can
be applied here, assuming MD5 is evenly distributed.

The probability q that among k people and n possible birthdays no two
share the same birthday satisfies:

q <= exp( - k(k-1)/2n )

n here is 2^x, x being the number of bits we keep in our hash.
k is the number of files in the time period we want to consider.

try k = 10000 files, x = 32 bits.

q <= .98842, 1.2% chance of collision.  Not terribly great, but with
file size, acceptible.

try k = 10000, x = 24 bits (divisible by 6).

q <= .05078, 94.9% chance of collision.  To achieve a similar level as
the 32bit hash, the # file window must be reduced to 635 at a time.

try k = 20000, x = 32 bits
q <= .953503, 4.5% chance of collision.  Still acceptible with file
size.

A 32 bit hash starts degenerating at around 40000 files, where the
collision probability approches 20%.  It's 35% at 60000 files, and
gets bad after that. 45% at 70000 files, 53% at 80000 files, 62% at
90000 files, 70% at 100000 files.

Comparatively, a 48-bit hash has a .0018% chance of collision with
100000 files.  Even a 36 bit hash has only a 7% collision chance at
100k files.

This is where my expertise ends.  If someone has data estimating the
number of files posted daily to usenet and how even a distribution MD5
is, it would be helpful.  I could throw up a few graphs on the web
comparing the bit sizes, too.

-Mike




Re: Using Message-ID to store binary file information -- Alternate probability calculation
#57552
Author: Russ Allbery
Date: Fri, 22 Mar 2002 22:08
27 lines
2752 bytes
Klaas <spamhole@klaas.ca> writes:

> This is where my expertise ends.  If someone has data estimating the
> number of files posted daily to usenet and how even a distribution MD5
> is, it would be helpful.  I could throw up a few graphs on the web
> comparing the bit sizes, too.

A good rough estimate for these sorts of back of the envelope calculations
would probably be around one million files a day.  I think it's actually
likely an order of magnitude less than that, but that may be optimistic; I
no longer participate much in the binary Usenet and it's been growing
fast.  One million shouldn't be off by *too* much, probably errs on the
side of caution, and it's a nice, round number convenient for doing math
with.

Native MD5 is a 128-bit hash.

MD5, as a cryptographically strong hash, is going to be evenly distributed
or close enough for the purposes of this exercise.  That's pretty much a
prerequisite for something to be a cryptographically strong hash.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Using Message-ID to store binary file information -- Alternateprobability calculation
#57557
Author: Klaas
Date: Fri, 22 Mar 2002 23:39
51 lines
3339 bytes
Russ Allbery <rra@stanford.edu> wrote in message
news:ylwuw4cl24.fsf@windlord.stanford.edu...
> Klaas <spamhole@klaas.ca> writes:
>
> > This is where my expertise ends.  If someone has data estimating
the
> > number of files posted daily to usenet and how even a distribution
MD5
> > is, it would be helpful.  I could throw up a few graphs on the web
> > comparing the bit sizes, too.
>
> A good rough estimate for these sorts of back of the envelope
calculations
> would probably be around one million files a day.  I think it's
actually
> likely an order of magnitude less than that, but that may be
optimistic; I
> no longer participate much in the binary Usenet and it's been
growing
> fast.  One million shouldn't be off by *too* much, probably errs on
the
> side of caution, and it's a nice, round number convenient for doing
math
> with.

I think you're right that it's about an order of magnitude less.
There are around 1 to 2 million headers a day, right?  Text accounts
for say 1.5GB day, assuming 3k article that's 500k messages.  If most
of the binaries are in multi-parts that's around 100-200k files a day.
But 1 million is a safe number, especially when factoring in future
expansion, as you suggest.

> Native MD5 is a 128-bit hash.
>
> MD5, as a cryptographically strong hash, is going to be evenly
distributed
> or close enough for the purposes of this exercise.  That's pretty
much a
> prerequisite for something to be a cryptographically strong hash.

Sounds good.  I threw together a graph of hash bits vs file count to
get a general view of the situation.  Note that these are lower bounds
on the probabilities, since the formula 1 - exp ( x(x-1)/2^(n+1)) was
used to calculate the probability.

http://usenet.klaas.ca/hash.jpg

-Mike


Re: Using Message-ID to store binary file information
#57558
Author: Curt Welch
Date: Fri, 22 Mar 2002 23:45
70 lines
5621 bytes
andrew@supernews.com wrote:
> this problem is known in the trade as the "birthday paradox".
>
> (If you assume that birthdays are evenly distributed through the year,
> you only need to get 23 people before you have a better-than-even chance
> that two of them have birthdays on the same day.)
>
> In general terms if you have N hash slots, the number of items K that
> you need to have an even chance of collision varies as sqrt(N). Putting
> that in binary terms means that you need at least twice as many bits of
> hash as you might otherwise expect.

That doesn't apply to this application.  Or it might, depending on
how you are thinking about it.  But lets not get confused (if that's
possible :)).

The birthday paradox only applies when you have a fixed sized set and
you are trying to avoid a hash collision between ANY of them.  That would
apply here to the problem of trying to use a hash to uniquely identify
ALL files posted to Usenet (or posted to a single group) within a
timeframe.

So, for example, if you were trying to download every file posted to
a group, and give than all unique names, you could use a hash to do that.
The size of the hash needed for that problem is related to the birthday
paradox.  If any file collides with any other file, you have a problem.

But when trying to find missing segments of files which a given user has
partially downloaded, we only worry about a hash collision between one
of the files he is looking for, and everything else posted to the group
over some extended period of time, like a year.  The size hash you need
for this problem will be smaller than the size you need for the
birthday paradox.  It will be a function of the "typical" number of partial
files the user will be seraching for.  If that number were as high as 100,
and the number of articles posted to the group in a year is Y, then the
number of potential collisions is on the order of 100*Y for this
problem instead of y^2 like it is for the birthday paradox.

In other words, a shorter hash may mean that about N files posted to the
group in a year will be expected to collide with N other files posted to
the same group, but the odds of a given user downloading one of those files
and trying to locate missing segments for it will be much smaller simply
because most users don't download most files.  If a typical user downloads
1 out of 100 files from the group, then the odds of him having a problem is
more like N/100 (that's probably wrong), but it will be much less than N.

Plus, if a file is posted, and a week later, segments are re-posted and the
user finds everything he needs, the fact that a different file posted 2
months later has the same short hash is not going to cause him a problem.
So there are mulitple effects at work reducing the odds of a hash collision
in the group causing a problem for the user.

So even though the birthday paradox is related to the odds of a hash
collision happening in the group, the probability of a user having a
problem because of one of those hash collision is much smaller.  So the
number of bits we need to reduce the user's problem to an acceptable level
is going to be smaller than the number of bits needed to solve all hash
collisions in the group (the birthday paradox).

I suspect that while the birthday problem may need 2x the number of bits
expected, this problem may simply need something closer to 1x. 1x I'm
thinking is what you need if the user only downloads one file and searchs
an entire year for missing parts, and if he searches for 100 files at once
on the average every day, then the you may need to add log2(100) more bits
to keep the probability of a problem the same?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57560
Author: Klaas
Date: Sat, 23 Mar 2002 00:58
152 lines
7824 bytes
Curt Welch <curt@kcwc.com> wrote in message
news:20020322184519.366$du@newsreader.com...
> andrew@supernews.com wrote:
> > this problem is known in the trade as the "birthday paradox".
> >
> > (If you assume that birthdays are evenly distributed through the
year,
> > you only need to get 23 people before you have a better-than-even
chance
> > that two of them have birthdays on the same day.)
> >
> > In general terms if you have N hash slots, the number of items K
that
> > you need to have an even chance of collision varies as sqrt(N).
Putting
> > that in binary terms means that you need at least twice as many
bits of
> > hash as you might otherwise expect.
>
> That doesn't apply to this application.  Or it might, depending on
> how you are thinking about it.  But lets not get confused (if that's
> possible :)).
>
> The birthday paradox only applies when you have a fixed sized set
and
> you are trying to avoid a hash collision between ANY of them.  That
would
> apply here to the problem of trying to use a hash to uniquely
identify
> ALL files posted to Usenet (or posted to a single group) within a
> timeframe.

But isn't that necessary?  The case you present below makes sense, but
on average, aren't _all_ files downloaded by some user?  And is it not
likely that for all files, at least one user will be missing one or
more parts?  I think it is likely that every file will be checked
against every other file (in the group, at least) if this scheme gains
popularity.

> So, for example, if you were trying to download every file posted to
> a group, and give than all unique names, you could use a hash to do
that.
> The size of the hash needed for that problem is related to the
birthday
> paradox.  If any file collides with any other file, you have a
problem.

Same problem if someone is trying to build an index of files posted to
the group, which this hash could be used for.

> But when trying to find missing segments of files which a given user
has
> partially downloaded, we only worry about a hash collision between
one
> of the files he is looking for, and everything else posted to the
group
> over some extended period of time, like a year.  The size hash you
need
> for this problem will be smaller than the size you need for the
> birthday paradox.  It will be a function of the "typical" number of
partial
> files the user will be seraching for.  If that number were as high
as 100,
> and the number of articles posted to the group in a year is Y, then
the
> number of potential collisions is on the order of 100*Y for this
> problem instead of y^2 like it is for the birthday paradox.

Sure, it's highly unlikely a specific user will have problems.  But
every file will be downloaded by some user, thus be compared against
all the rest.  Or are you arguing something different?

> In other words, a shorter hash may mean that about N files posted to
the
> group in a year will be expected to collide with N other files
posted to
> the same group, but the odds of a given user downloading one of
those files
> and trying to locate missing segments for it will be much smaller
simply
> because most users don't download most files.  If a typical user
downloads
> 1 out of 100 files from the group, then the odds of him having a
problem is
> more like N/100 (that's probably wrong), but it will be much less
than N.

Same objection.

> Plus, if a file is posted, and a week later, segments are re-posted
and the
> user finds everything he needs, the fact that a different file
posted 2
> months later has the same short hash is not going to cause him a
problem.
> So there are mulitple effects at work reducing the odds of a hash
collision
> in the group causing a problem for the user.

True.  Other facts, such as the notion that it is unlikely that anyone
will wait a whole year to complete a file, are odds-reducers.

> So even though the birthday paradox is related to the odds of a hash
> collision happening in the group, the probability of a user having a
> problem because of one of those hash collision is much smaller.  So
the
> number of bits we need to reduce the user's problem to an acceptable
level
> is going to be smaller than the number of bits needed to solve all
hash
> collisions in the group (the birthday paradox).

Let me try to reason this a bit.  There are N files posted to the
group in a year, M of which collide.  Hopefully, M/N will be quite
small.  The average user has a 100/N * M/N chance of encountering a
collision (I grant that it's really something like 1 -
(1-m/n)^(100/n), but the other version is close enough).  Assuming
there are at least N/100 users (every file gets downloaded), there is
still a n/100 * 100/n*m/n = m/n chance of _someone_ experiencing a
collision.  Sure, the chance for the average user is 1/100th of the
birthday paradox chance for the group, but it is still likely that
_someone_ will experience a collision.

> I suspect that while the birthday problem may need 2x the number of
bits
> expected, this problem may simply need something closer to 1x. 1x
I'm
> thinking is what you need if the user only downloads one file and
searchs
> an entire year for missing parts, and if he searches for 100 files
at once
> on the average every day, then the you may need to add log2(100)
more bits
> to keep the probability of a problem the same?

Something like that.  However, the number of bits you need you add to
keep the probability the same in the birthday paradox is a function of
ln(x) too, so both angles are equivalent in that sense.

I wonder, though, if this discussion is necessary, especially if you
are only looking for group-unique hashes. 6 characters of base64 gives
a 36-bit hash, which is adequate for usenet-global uniqueness when
coupled with file size (assuming there aren't more than 80000 articles
posted to usenet in a year with the same size).  7 characters of
base64 is sufficient to uniquely identify between 600000 articles with
a collision probability of <5%.  If all that is needed is a
group-unique hash, 6 characters is plenty.

-MIke


Re: Using Message-ID to store binary file information
#57561
Author: Curt Welch
Date: Sat, 23 Mar 2002 01:33
79 lines
6055 bytes
"Klaas" <spamhole@klaas.ca> wrote:
> Curt Welch <curt@kcwc.com> wrote in message
> news:20020322184519.366$du@newsreader.com...

> Sure, it's highly unlikely a specific user will have problems.  But
> every file will be downloaded by some user, thus be compared against
> all the rest.

That's the wrong thing to look at.

> Or are you arguing something different?

I'm saying it's not important that some user is having a problem.  What's
important is only how often a given user is likely to see a problem.

Someone dies in a car accident every day.  But that fact doesn't stop most
of us from driving in cars because what's important to us is only the odds
that WE or someone we know will die in a car accident instead of dieing for
other reasons first.  Those odds are very very small and that's what's
important to us.

Likewise, for this discussion, it's not important that 10 out of a million
users are having a download problem caused by a hash collision every day.
That doesn't prevent us from thinking the system is working perfictly
because we know that on the average we would have to use the system for 10
years before we will even hear about one of those problems and we would
have to use it for 100 years before we are likely to have it ourself.

In that 100 years, how many problems are you likely to have because someone
posted a corrupted file and you downloaded it and couldn't make it work?
Or posted in a format you couldn't deal with and ended up wasting hours
trying to find a way to view the file but in the end threw it way?  Anyone
downloading files from Usenet has a LOT of problems making things work now.
If the hash problem is an order of magnatude less than all the other
problems, no one will even think twice about it - i.e it won't be a
problem.

> I wonder, though, if this discussion is necessary, especially if you
> are only looking for group-unique hashes. 6 characters of base64 gives
> a 36-bit hash, which is adequate for usenet-global uniqueness when
> coupled with file size (assuming there aren't more than 80000 articles
> posted to usenet in a year with the same size).  7 characters of
> base64 is sufficient to uniquely identify between 600000 articles with
> a collision probability of <5%.  If all that is needed is a
> group-unique hash, 6 characters is plenty.

It won't just need to be group unique because you will want your download
tool to check a lot of groups to see if the file you were looking for was
reposted anywhere.  Looking for an MP3 file across all the mp3 groups for
example would be an obvious thing to do.  The only thing to limit the
number of groups you configured your newsreader to scan is the amount of
time you were willing to spend downloading headers.  And if the Message-ID
alone is good enough to spot potential targets, then the groups you scan
for mising segments don't even need full XOVER headers, they only needed to
be scaned for the Message-Id which is much faster and much less bandwidth
so you could add a lot of scan-for-missing-segment groups.  It seems to me
that many people working with tools that could find missing segments no
matter where they were posted would tend to add a lot of groups to their
scan list even if they were not willing to scan the headers manually
looking for new stuff in that many groups.

And if this type of technology became common place on usenet, maybe
news servers could start creating indexes (pseudo groups) based on
these short hashes.  So ubin.a6ft3h was a pseudo group which listed
all articles on the server with that hash.  The newsreader could scan those
groups to find missing file segments for the same file posted to any group
on Usenet.  This then makes the hash problem usenet-wide instead of
group-wide.

But if a large hash is in the headers, and only a short hash + file size is
in the Message-ID, then the hash only needs to be large enough to prevent
the download tool from having too many HEAD commands to eliminate the flase
positives, and 36 bits of hash in the Message-ID sure seems like more than
enough to solve that problem to me.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57562
Author: J.B. Moreno
Date: Sat, 23 Mar 2002 01:37
21 lines
2176 bytes
In article <3c9baac6.13143333@news>, 
 =-lordsnow-= <lordsnow@home.nl> wrote:

> Curt Welch <curt@kcwc.com>
> > The other problem is that bits in the Message-ID are about 10 times (wild
> > guess) more "expensive" to Usenet than every other byte in an article.
> 
> yikes...
> 
> It's been a few years since I read the RFC. I'll have to re-visit them.

The Message-ID is used more frequently than anything else -- it's used
to retrieve headers and bodies, but the big hit is when it's included
in the References header.

Of course this isn't a problem with the message-id's of binaries, as
they are seldom replied to.

-- 
J.B. Moreno
Re: Using Message-ID to store binary file information -- Alternateprobability calculation
#57563
Author: Curt Welch
Date: Sat, 23 Mar 2002 01:46
16 lines
2213 bytes
"Klaas" <spamhole@klaas.ca> wrote:
> I threw together a graph of hash bits vs file count to
> get a general view of the situation.  Note that these are lower bounds
> on the probabilities, since the formula 1 - exp ( x(x-1)/2^(n+1)) was
> used to calculate the probability.
>
> http://usenet.klaas.ca/hash.jpg

Cool.

Could you try a log scale on the x axis and add curves for 64 and 128 bits?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57564
Author: Joe Newsreader
Date: Sat, 23 Mar 2002 02:05
21 lines
2681 bytes
On 23 Mar 2002 00:59:41 GMT, curt@kcwc.com (Curt Welch) wrote:

>I never have figured out what MasterSplitter is even though I've seen
>references to it for a long time.  Is there some reason for using it other
>than for posting to Usenet?

It's a program that can take a large file and chop it into
smaller pieces, or take the pieces and re-assemble them
into the original file.  Mastersplitter does it the simple way,
and you could re-assemble the parts using just a unix 'cat'
command.

I've never seen Mastersplitter used for anything but posting 
to Usenet.  There is also a more complicated program called
WinRAR that is also used to break up large files for posting,
but the RAR format is a true multifile archive with compression,
so it is used for more than just posting to Usenet.

Joe

Re: Using Message-ID to store binary file information
#57565
Author: Klaas
Date: Sat, 23 Mar 2002 02:18
111 lines
5549 bytes
Curt Welch <curt@kcwc.com> wrote in message
news:20020322195941.840$tN@newsreader.com...
> lordsnow@home.nl (=-lordsnow-=) wrote:


> BTW, part two of this technology is the ability to post machine
readable
> re-post requests.  By hitting a button, a user could send a re-post
request
> which lists the files he is currently missing segments for and the
byte
> ranges for the "holes" in his files.  Newsreaders could
automatically spot
> download requsts for files which are in it's database, and show the
list to
> the user so if he wants to be nice and help with a repost request,
he could
> simply hit a button to do so. Only the "holes" would need to be
re-posted,
> though the user could decide to repost the entire file if it had not
been
> posted in a long time (the newsreader could even help keep track of
that
> stuff for everyone).

Hopefully such requests will be human-readable too.  Perhaps some
internal checks could be made to make sure there aren't too many
repost requests in the group or some such?  I also worry about the
fact that due to the unreliable nature of usenet transport, won't
many/most bytes be requested by many people?  It would be helpful to
collect requests for a few days to get an idea of what is needed.  I'm
not totally against this idea, but it will definately have to be
implemented carefully.

> > That's what I been looking into. MD-5 seemed the obvious candidate
> > because it's standard and fairly fast. NewsBinPro uses
Ripe-MD/160+CRC16
> > for it's database. After looking around, I liked Tiger/192 - at
least
> > just as MD5 on 32-bit CPU's but 3 times faster on 64-bit CPU's,
and the
>          ^fast as?
>
> > advantage of having a bigger hash.
>
> We wouldn't want to pick a hash that we out-grew in 10 years as the
posting
> volume continued to grow, so if there's a good 192 bit hash maybe we
should
> consider it.
>
> So back to the math.  How many files do you have look at before the
> probability of a collision hits 50% for MD5?  Something near the
> sqrt(2^128)?  i.e. around 2^64?

2.171938e19 files.  Awfully close (within 20% of) 2^64 ;).

> I don't know how many files get posted to usenet on a typical day,
but the
> article count is around 1.5M per day now.  I'd guess that maybe 1M
of those
> are text articles leaving around 500K binary articles.  If the
average
> number of parts per file is 10, that puts the number of files per
day
> posted to Usenet around 50K (near 2^16). A year at that rate gets us
to
> 2^24 files (ignoring the number of files which are reposts of stuff
> previously posted - which over a period as long as a year is
probably very
> significat.)
>
> So for todays volume, I think MD5 has more than enough headroom if
my math
> and my assumptions are valid.  But how long into the future will it
last?
> The exponential growth of usenet causes a constant number of bits to
be
> added every year, but I have no figures on the growth rate of the
number of
> unique files being posted to usenet.  But the growth rate of the
volume is
> on the order of magnatude of 1 bit per year (a little higher).  And
since
> file size is growing as well, I would expect the growth rate of the
number
> of files to be quite a bit less than that.  If it were 1/2 bit per
year
> (number of files doubles every two years), and we still have over 40
bits
> of headroom with MD5, that means it could last 80 years before the
odds of
> two files posted to Usenet in the same year having the same MD5
reaches
> 50%.  And even when that happens, the odds that any one user would
see that
> as a problem will be a lot less.  So, if MD5 does do a good job of
creating
> 128 well distributed bits, then it seems to me that it will have a
much
> longer lifespan than we need (A lifespan of 20 years seems more than
enough
> for any new standard for Usenet to me).

As far as I can tell, your math is spot on.  It's not like we're
imposing a 640kB ceiling on RAM, right? ;p

-Mike


Re: Using Message-ID to store binary file information
#57570
Author: J.B. Moreno
Date: Sun, 24 Mar 2002 02:06
17 lines
2242 bytes
In article <20020322195941.840$tN@newsreader.com>, 
 Curt Welch <curt@kcwc.com> wrote:

> I don't know how many files get posted to usenet on a typical day, but the
> article count is around 1.5M per day now.  I'd guess that maybe 1M of those
> are text articles leaving around 500K binary articles.  If the average
> number of parts per file is 10, that puts the number of files per day
> posted to Usenet around 50K (near 2^16).

Uhm, are you sure about your numbers -- there seem to be about 250-500k
yEncoded articles being posted each day, and I believe that it's still
outnumbered by uuencoded articles.  And I'm not sure about the number
of parts either -- lots of post with over a hundred parts.

-- 
J.B. Moreno
Re: Using Message-ID to store binary file information
#57572
Author: J.B. Moreno
Date: Sun, 24 Mar 2002 02:17
16 lines
2101 bytes
In article <20020322195941.840$tN@newsreader.com>,
 Curt Welch <curt@kcwc.com> wrote:

> With the new technology we are talking about, there will no longer be
> a need to split huge files into smaller chunks before posting to
> Usenet. It's done now because when errors happen, many download tools
> can't deal with partial reposts.

Uhm, the reason it is done now is not because of errors -- it's done
because larger chunks don't propagate very well.  Anything over 500k
seems to have problems -- of course we hope to improve that, but that's
the current problem.

-- 
J.B. Moreno
Re: Using Message-ID to store binary file information
#57571
Author: Curt Welch
Date: Sun, 24 Mar 2002 04:12
64 lines
4773 bytes
"Klaas" <spamhole@klaas.ca> wrote:
> Curt Welch <curt@kcwc.com> wrote in message
> news:20020322195941.840$tN@newsreader.com...
> > BTW, part two of this technology is the ability to post machine
> > readable re-post requests.

> Hopefully such requests will be human-readable too.

For sure.

> Perhaps some
> internal checks could be made to make sure there aren't too many
> repost requests in the group or some such?  I also worry about the
> fact that due to the unreliable nature of usenet transport, won't
> many/most bytes be requested by many people?  It would be helpful to
> collect requests for a few days to get an idea of what is needed.  I'm
> not totally against this idea, but it will definately have to be
> implemented carefully.

Yeah, those are all valid issues to think about or deal with when trying
to implement such a system.

If the volume of repost requests get too high, one option is to simply
move it into a sub group.  Or, if they are labeled in a standard way,
build in filtering to hide them.

The newsreader could keep track of everything requested for repost and
the number of people requesting each segment of the file and when the
newsreader sees a segment reposted could update (delete) all the stored
requests for that segment assuming the request had been honorded etc.

There's lots of options about how it might work.

The good thing is that the newsreadser could use these repost requests as
votes, and give the posters an accurate idea of what files are getting the
most requests, so when reposts are sent.  You are right that if the systems
is used enough, you might end up with repost requests for every byte of
everything posted.  But only the stuff that the most number of people are
asking for would actually get reposted.

The real goal of course is to reduce the need for reposts.  And the idea
of putting the full article size into the Message-ID is mainly an attempt
to do that.  Articles are dropped not because the news server technology
is broken, but because many sites can't afford to run a full feed server,
but can afford to run a partial server.  And those sites have no easy way
of getting a partial feed other than using bandwidth limiting techniques
which cause articles to be dropped randomly.  And that act of randomly
dropping articles is what causes so many people to see posts which are
mostly there, but have a few articles missing.

These Message-ID size labels would allow servers to drop the largest file
posts first, and drop all the articles for them instead of just randomly
dropping a few articles from the post.  Part 0 posts, and repost requests,
and par files should all all have similar IDs showing the file they are
related to so that a news sever which was filtering all posts over 50MB
would filter all those articles associated with that post.  I guess it
would even be useful for a follow-up to one of these articles to also
custimize a Message-ID which matches the orginal so they would get filtered
as well.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57573
Author: Curt Welch
Date: Sun, 24 Mar 2002 04:36
44 lines
3756 bytes
lordsnow@home.nl (=-lordsnow-=) wrote:

> That's why I like the idea of adding PAR-like functionality as standard.
>
> If the most number of files anyone is missing is X, then X PAR-like
> files need to be reposted. Others missing less (and different?) parts
> may also use them to reconstruct the parts.
>
> It might be good practise to automatically generate and post 1 PAR file
> for every XYZ bytes of a file. (i.e. 5MB => 1 PAR file, 10MB => 2 PAR
> files, ...)

Usenet is having lost article problems because there is too much volume.
Making it a practice to post extra data for every post only makes the
problem worse, not better.  I think it will always be better to post the
file first, and then decide what to repost based on what is requested the
most.  But being able to use Par files instead reposting only hard segments
would of course be good.

But that brings up another important issue.  If we label the data segments
in the Message-ID, we want to label the par files as well with a simlar
Message-ID so servers which decide to reject the orginal article will also
reject the associated PAR files.  Mostly, this means the hash and the full
file size of the orginal article is what needs to be put into the message
id.  But if "hard" segments of a file include an segment offset and length,
what do we put in there to describe the Par file?

I need to learn more about Par files.

When generating a par file, is the orginal file always chopped up into
blocks of a given size?  And the par files are the same size as these
blocks?  I'm trying to understand the complex issues of how a par file
which was created for a post that had 20 parts, could be used to fix
missing segments of the same file, when the missing segments were from a
post that had say 32 parts?  What's possible in this regard, and how must a
"generic" par file be labelled in order to figure out if the par file will
actually be useful before it's downloaded.  Is it for example something
that can be described with blocksize X number-of-par-files type of
description?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57574
Author: Curt Welch
Date: Sun, 24 Mar 2002 04:43
32 lines
3161 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <20020322195941.840$tN@newsreader.com>,
>  Curt Welch <curt@kcwc.com> wrote:
>
> > I don't know how many files get posted to usenet on a typical day, but
> > the article count is around 1.5M per day now.  I'd guess that maybe 1M
> > of those are text articles leaving around 500K binary articles.  If the
> > average number of parts per file is 10, that puts the number of files
> > per day posted to Usenet around 50K (near 2^16).
>
> Uhm, are you sure about your numbers -- there seem to be about 250-500k
> yEncoded articles being posted each day, and I believe that it's still
> outnumbered by uuencoded articles.  And I'm not sure about the number
> of parts either -- lots of post with over a hundred parts.

No, I'm not sure at all.  They were all wild guesses.  The only real number
I had was the number of articles which showed up on my server recently in a
day.  The number of binary articles posted daily could easilly be 1M.  My
guesses could be off by 100%.  Someone else in this thread guessed 1M
binary articles per day I believe.

But if we have lots of 100 part posts, then my guess at 10 being the averge
could be 100% low as well, so my two errors could have balanced out
producing a roughly correct number of "files" per day.

Maybe someone from easynews could give us a rough count of the total number
of files posted to usenet per day?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57575
Author: Curt Welch
Date: Sun, 24 Mar 2002 04:59
39 lines
3650 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> In article <20020322195941.840$tN@newsreader.com>,
>  Curt Welch <curt@kcwc.com> wrote:
>
> > With the new technology we are talking about, there will no longer be
> > a need to split huge files into smaller chunks before posting to
> > Usenet. It's done now because when errors happen, many download tools
> > can't deal with partial reposts.
>
> Uhm, the reason it is done now is not because of errors -- it's done
> because larger chunks don't propagate very well.  Anything over 500k
> seems to have problems -- of course we hope to improve that, but that's
> the current problem.

You mis-understand what I was talking about.  People take 100MB files
and split them into 10MB chunks (I don't know if these sizes are typical).
Then they post each 10MB chunk as 34 300K articles.  The reason they do
this two step process is because the current tools don't work very well
when you try to post the 100MB file as a single 340 part post.  They might
for example post a single 10MB chunk each day because it takes the guy with
the modem doing the post hours to post even one chunk.  People trying to
download the post can have a very hard time trying to grab a 340 part post,
but not have as much trouble grabbing each of the 34 part posts (one per
night).

With this new technology, it should make it much easier for people to
simply post these files as 340 parts - even if it takes a week to send
all the posts.  The download tools will no longer need to see all
the parts before starting the download.  You only need to see one part
and tell your tool to download that and start collecting other parts
as it sees them.  So each day you check the group and the download tools
identifies all the new parts it needs to download without the user having
to search and identify anything, or without the user having to way for the
entire post to show up.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57585
Author: Joe Newsreader
Date: Sun, 24 Mar 2002 12:58
37 lines
3643 bytes
On 24 Mar 2002 04:36:41 GMT, curt@kcwc.com (Curt Welch) wrote:

>I need to learn more about Par files.
>
>When generating a par file, is the orginal file always chopped up into
>blocks of a given size?  And the par files are the same size as these
>blocks?  I'm trying to understand the complex issues of how a par file
>which was created for a post that had 20 parts, could be used to fix
>missing segments of the same file, when the missing segments were from a
>post that had say 32 parts?  What's possible in this regard, and how must a
>"generic" par file be labelled in order to figure out if the par file will
>actually be useful before it's downloaded.  Is it for example something
>that can be described with blocksize X number-of-par-files type of
>description?

Par files are generated for _sets_ of files.  There would be no
advantage ( as presently implemented ) to using Par for a single-file
post, because the Par file(s) would be as big as the file being posted,
and a simple repost would do just as well.

Each Par file is as big as the biggest file in the set, plus some
small overhead (hundreds of bytes).  There is also a very small
"master" Par file that doesn't help you recover, but which includes
the CRC information needed to allow checking of downloaded files.

When downloading a set of files that is protected by Par, you need
to get as many intact files as there were files in the original set.
The number of Par files needed to recover is equal to the number
of original files that are missing or corrupt.

If a single large file is posted in parts, there is presently no way to
protect the parts with Par.  To do this, I believe the Par logic would
have to be integrated into the posting and reading programs.

Joe

Re: Using Message-ID to store binary file information
#57587
Author: Jonathan Grobe
Date: Sun, 24 Mar 2002 13:52
16 lines
1996 bytes
In article <20020323231242.049$VX@newsreader.com>, Curt Welch wrote:
>
>These Message-ID size labels would allow servers to drop the largest file
>posts first, and drop all the articles for them instead of just randomly
>dropping a few articles from the post.  

With servers dropping the largest file sizes first, won't this
result in posters not using this technology for the very large
files--since they know they will be filtered out at most sites if they
do? Isn't a missing part problem (with the parts being able to
be reposted) better than not being propagated at all?

-- 
Jonathan Grobe

Re: Using Message-ID to store binary file information
#57596
Author: Curt Welch
Date: Sun, 24 Mar 2002 16:45
60 lines
4838 bytes
grobe@netins.net (Jonathan Grobe) wrote:
> In article <20020323231242.049$VX@newsreader.com>, Curt Welch wrote:
> >
> >These Message-ID size labels would allow servers to drop the largest
> >file posts first, and drop all the articles for them instead of just
> >randomly dropping a few articles from the post.
>
> With servers dropping the largest file sizes first, won't this
> result in posters not using this technology for the very large
> files--since they know they will be filtered out at most sites if they
> do?

Yeah, it could happen.  And that effect could prevent this type of
technology from ever taking hold.  If the technology only allowed news
sites to filter the post and didn't offer the users anything, then it would
happen for sure.

The trick is to create a technology that makes things better for everytone,
not just one segment (like the news admins).  If someone posts a large file
and doesn't use the technology, then the downloaders that see it will yell
at the poster and tell them to use new technology next time.

If the new technology makes it a lot easier to download files, then people
may well look at a post in another format as a total waste of resources.
If it's not in the new format, they may see it as unusable anyway and would
rather not see it all on their server than have it show up and cause other
stuff they want to be bumped off.  I suspect that effect is already at work
with yEnc.

> Isn't a missing part problem (with the parts being able to
> be reposted) better than not being propagated at all?

Hard to say for sure.  But I don't think so.  You have to remeber that the
posts are being dropped because the servers have already passed the maximum
number of bytes it can receive in a day.  It's impossible to fix that
problem by posting more articles.  Every repost that makes it through is
simply causing another article in another group somewhere else to be lost.
Reposts make it worse, not better.

It simply becomes a shoving match with the people who are willing to shove
the hardest able to get what they want at the expense of everyone else.
i.e., the users who are willing to find the PAR tools, and take the time to
ask for reposts, and take the time to repost, are the ones that "win".  But
when that 5% of users "win", it means the rest all loose - they have
alomost nothing to download and don't care enough to figure out how to
"beat" the other users.

On a server which is dropping only 10% of the articles you end up with some
much large percentage of posts with missing parts (50%?).  Any post with 10
or more articles is almost guaranteeded to be missing at least one part.
What's the point of sending 190 parts of a 200 part post if it means that
190 other smaller posts will now end up with a single missing part?  Why
wouldn't it be better to filter out that 200 part post if it allows 100
smaller posts to be complete and encourages the users who want those large
posts to move to a server where they are avaialble?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57614
Author: Curt Welch
Date: Sun, 24 Mar 2002 23:41
34 lines
3409 bytes
Joe Newsreader <not@this.address> wrote:

> If a single large file is posted in parts, there is presently no way to
> protect the parts with Par.  To do this, I believe the Par logic would
> have to be integrated into the posting and reading programs.

Right I see that now.  I've read up on how Par files are being used.  The
utilities work at the file level and not the article level.  So people
split up large files into many small files, then create par files as
required.  Then post each of the files and the par files as a set of
multipart articles.  There is no easy way to make use of Par files how they
are now used if you don't first split your large file up into smaller
files.  And if a user is missing only one article out of a 10 article
series for one of the smaller files, there's now way to address that
directly.  You just pretend the entire 10 article set was lost.

For what I'm trying to do (allow users to post huge files as a small ton of
smaller segments), the Reed-Solomon technology just has to be built into to
the posting/reading clients directly instead of trying to use them as
standalone tools.  And the format of the files will need to be different as
well from tradational par files.  I'll have to look more at this.

Also, Par files seem to use 8bit words in all the standard Par files.  And
with an 8 bit word length, that limits you to a max of 256 data files + par
files per set.  That would be complex to deal with when you are trying to
post a 5000 segment DVD.  You couldn't post par files for the entire set,
you would instead have to post par files for sub-sets of the post (i.e.
like for every 128 segments posted).  I'll have to think more about how
this might best be done.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57631
Author: Claus Färber
Date: Mon, 25 Mar 2002 12:22
61 lines
4008 bytes
Curt Welch <curt@kcwc.com> schrieb/wrote:
> Also, Par files seem to use 8bit words in all the standard Par files.  And
> with an 8 bit word length, that limits you to a max of 256 data files + par
> files per set.  That would be complex to deal with when you are trying to
> post a 5000 segment DVD.  You couldn't post par files for the entire set,
> you would instead have to post par files for sub-sets of the post (i.e.
> like for every 128 segments posted).  I'll have to think more about how
> this might best be done.

Well, what about this:

A file is split into n segments (example below: 19), which are
gathered together in blocks of m segments (below: 4).

The numbering scheme works like this: The first segments of each
blocks get the lowest numbers, then the second segments of each
block and so on.

For example (vertical position of the number for better
illustration only):

  File start                                        File end
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
  |01|  |  |  |02|  |  |  |03|  |  |  |04|  |  |  |05|  |  |
  |  |06|  |  |  |07|  |  |  |08|  |  |  |09|  |  |  |10|  |
  |  |  |11|  |  |  |12|  |  |  |13|  |  |  |14|  |  |  |15|
  |  |  |  |16|  |  |  |17|  |  |  |18|  |  |  |19|  |  |  |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

For each block, o partity files are created. They are numbered in
block order:

  +-----------+-----------+-----------+-----------+--------+
  |    P01    |    P02    |    P03    |    P04    |  P05   |
  +-----------+-----------+-----------+-----------+--------+

  +-----------+-----------+-----------+-----------+--------+
  |    P06    |    P07    |    P08    |    P09    |  P10   |
  +-----------+-----------+-----------+-----------+--------+

More parity information can be added (and posted) later.

Not that knowing the total count of data segments and the block
size you can associate the parity segments with the correct data
segments.

However, I explicitly propose listing the byte ranges in addition
to any segment number information and using the later only for
user information.

The data sements are posted in numerical order, after them the
parity segments are posted in numerical order, too. Using this  
interleaving scheme, "bursts" of missing posts will most likely  
hit different parts of the file and so can be reconstructed using  
the parity information.

Claus
-- 
------------------------ http://www.faerber.muc.de/ ------------------------
OpenPGP: DSS 1024/639680F0 E7A8 AADB 6C8A 2450 67EA AF68 48A5 0E63 6396 80F0
Optimizing Binary Usenet servers
#57639
Author: Dennis SCP
Date: Mon, 25 Mar 2002 16:23
44 lines
4292 bytes
Jonathan Grobe <grobe@netins.net> wrote:

> With servers dropping the largest file sizes first, won't this
> result in posters not using this technology for the very large
> files--since they know they will be filtered out at most sites if they
> do? Isn't a missing part problem (with the parts being able to
> be reposted) better than not being propagated at all?

Yeah, I used to think this was the reason to post 400k parts instead of
1MB or more.

When filesize becomes available to servers and people start rewriting
server software to use it we should have a plan ready to make sure we
stop posters from resorting to posting tiny
human-readable-only-multiparts because servers block large files.

Instead of blocking large things you let a group be Full.
You set a group to have a lower max size and higher max size. Once the
lower max size has been reached no more new files are accepted in the
group. Only missing parts. When the higher max size is reached you start
discarding older files. You could have a minimal storage time say 24 or
48 hours for files.

Non binary files would get a smaller storage size and get discarded
whenever anything new comes in, making it very unreliable for (UUencode)
multiparts but also makes sure most text messages come through, although
they might get discarded quickly, but that is the same as usenet is now
and thus expected.

This would make binary usenet the preferred way of posting binaries
because anything that goes in comes out complete and well. Only when the
specific group is very busy do you find that your file has not been
distributed to many servers, you just have to wait for the group to get
a bit less busy and try again. 

On smaller servers it is now a lottery whether all parts get through, on
binary usenet it will be a lottery whether a file becomes available, but
when it does it is complete. A huge improvement.
-- 
Dennis SCP [nl,en,(de)]                                         Kuyichi
Je sponsort nu TV reclames van je merkkleding, waarom geen merkkleding
kopen waarbij jouw geld arbo verbetering in arme landen eist? 
Kuyichi - Trendy jeansware & fair trade - Rotterdam: Yep Lifestyle
Re: Using Message-ID to store binary file information -- Alternateprobability calculation
#57640
Author: Klaas
Date: Mon, 25 Mar 2002 17:52
26 lines
2397 bytes
Curt Welch <curt@kcwc.com> wrote in message
news:20020322204607.947$2M@newsreader.com...
> "Klaas" <spamhole@klaas.ca> wrote:
> > I threw together a graph of hash bits vs file count to
> > get a general view of the situation.  Note that these are lower
bounds
> > on the probabilities, since the formula 1 - exp ( x(x-1)/2^(n+1))
was
> > used to calculate the probability.
> >
> > http://usenet.klaas.ca/hash.jpg
>
> Cool.
>
> Could you try a log scale on the x axis and add curves for 64 and
128 bits?

I've looked for the past few days for a decent graphing program that
supports log on the x axis only, to no avail.  If I find one, I'll do
it up.

-Mike


Re: Using Message-ID to store binary file information -- Alternateprobability calculation
#57642
Author: Russ Allbery
Date: Mon, 25 Mar 2002 18:50
14 lines
2152 bytes
Klaas <spamhole@klaas.ca> writes:

> I've looked for the past few days for a decent graphing program that
> supports log on the x axis only, to no avail.  If I find one, I'll do it
> up.

Can't gnuplot do that sort of thing?

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Using Message-ID to store binary file information
#57647
Author: Joe Newsreader
Date: Tue, 26 Mar 2002 01:48
28 lines
3032 bytes
On Mon, 25 Mar 2002 22:27:15 GMT, lordsnow@home.nl (=-lordsnow-=) wrote:

>> Each Par file is as big as the biggest file in the set, plus some
>> small overhead (hundreds of bytes).  There is also a very small
>> "master" Par file that doesn't help you recover, but which includes
>> the CRC information needed to allow checking of downloaded files.
>
>This sounds correct.. I think I was wrong when I said parts need
>to be EXACTLY the same.

I believe that the shorter files are extended (by assuming the missing
bytes are nulls (0x00)) when the Reed-Soloman codes are generated.
You need to know the lengths when reconstructing, because the basic
logic always yeilds reconstructed data of the maximum length, which
then must be trimmed down to the original length of the file being
reconstructed.

I believe the file lengths are in the small master .PAR file, and also in
each of the par files that can be used for correction.

If you want to protect the parts of a multipart post, you either have to 
make all the parts the same size[1], or else keep track of the sizes of
each of the parts and put that information into the par parts.

Joe

[1] Before encoding, if the encoded length depends on content (like yenc).
Re: Using Message-ID to store binary file information
#57656
Author: Curt Welch
Date: Tue, 26 Mar 2002 05:36
35 lines
3292 bytes
Joe Newsreader <not@this.address> wrote:
> I believe that the shorter files are extended (by assuming the missing
> bytes are nulls (0x00)) when the Reed-Soloman codes are generated.
> You need to know the lengths when reconstructing, because the basic
> logic always yeilds reconstructed data of the maximum length, which
> then must be trimmed down to the original length of the file being
> reconstructed.

Yes, that is how it seems to work based on what I read.

> I believe the file lengths are in the small master .PAR file, and also in
> each of the par files that can be used for correction.

Right.  Along with MD5s of all the files so the tools can make sure they
have the right files and make sure they are not corrupt.

> If you want to protect the parts of a multipart post, you either have to
> make all the parts the same size[1], or else keep track of the sizes of
> each of the parts and put that information into the par parts.

No, not really.  We don't want the par files to have anything to do with
the sizes of the posted articles.  We want the par files to calculate
checksums for well defined bytes in the file which will be easy to specify
in a short header on the Par file itself.  The download tool simply keeps
track of what byte ranges are still missing from the file, and needs to be
able to look at that par header and figure out if the par file will be
helpful to fill in any of the missing bytes.  Current par files aren't
based on the original large file, they are based on the split version.  But
nothing about how the big file was split gets stored in the par file
description.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57659
Author: Curt Welch
Date: Tue, 26 Mar 2002 06:12
40 lines
3249 bytes
claus-usenet-20020325@faerber.muc.de (Claus_F�rber) wrote:
> Well, what about this:
>
> A file is split into n segments (example below: 19), which are
> gathered together in blocks of m segments (below: 4).
>
> The numbering scheme works like this: The first segments of each
> blocks get the lowest numbers, then the second segments of each
> block and so on.
>
> For example (vertical position of the number for better
> illustration only):
>
>   File start                                        File end
>   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
>   |01|  |  |  |02|  |  |  |03|  |  |  |04|  |  |  |05|  |  |
>   |  |06|  |  |  |07|  |  |  |08|  |  |  |09|  |  |  |10|  |
>   |  |  |11|  |  |  |12|  |  |  |13|  |  |  |14|  |  |  |15|
>   |  |  |  |16|  |  |  |17|  |  |  |18|  |  |  |19|  |  |  |
>   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
>
> For each block, o partity files are created. They are numbered in
> block order:
>
>   +-----------+-----------+-----------+-----------+--------+
>   |    P01    |    P02    |    P03    |    P04    |  P05   |
>   +-----------+-----------+-----------+-----------+--------+

Something like that is what I'm talking about.  But I don't follow
what you are saying.

Which bytes in the file does P01 calculate a checksum for?  You
seem to say it's the block, would be segments 1, 6, 11, and 16
above.  How big is P01?  The same size as a segment? Or are you
saying P01 would be for segments 1, 2, 3 and 4?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: Using Message-ID to store binary file information
#57661
Author: Claus Färber
Date: Tue, 26 Mar 2002 11:00
22 lines
2290 bytes
Curt Welch <curt@kcwc.com> schrieb/wrote:
> Which bytes in the file does P01 calculate a checksum for?  You
> seem to say it's the block, would be segments 1, 6, 11, and 16
> above.  How big is P01?  The same size as a segment?

Exactly.

(Actually, if you only include the segment numbers for  
informational purposes [and posting order], but do the  
recombination based on byte ranges, you could create parity files  
for any combination of segments.)

> Or are you saying P01 would be for segments 1, 2, 3 and 4?

No, this could not handle "bursts" of missing posts, such as 2-5  
missing.

Claus
-- 
------------------------ http://www.faerber.muc.de/ ------------------------
OpenPGP: DSS 1024/639680F0 E7A8 AADB 6C8A 2450 67EA AF68 48A5 0E63 6396 80F0
Re: Using Message-ID to store binary file information
#57666
Author: Joe Newsreader
Date: Tue, 26 Mar 2002 15:38
33 lines
3580 bytes
On 26 Mar 2002 05:36:49 GMT, curt@kcwc.com (Curt Welch) wrote:

>> If you want to protect the parts of a multipart post, you either have to
>> make all the parts the same size[1], or else keep track of the sizes of
>> each of the parts and put that information into the par parts.
>
>No, not really.  We don't want the par files to have anything to do with
>the sizes of the posted articles.  We want the par files to calculate
>checksums for well defined bytes in the file which will be easy to specify
>in a short header on the Par file itself.  The download tool simply keeps
>track of what byte ranges are still missing from the file, and needs to be
>able to look at that par header and figure out if the par file will be
>helpful to fill in any of the missing bytes.  Current par files aren't
>based on the original large file, they are based on the split version.  But
>nothing about how the big file was split gets stored in the par file
>description.

Oh, that's clever.  Don't actually break up the file, just treat it as an array
of parts of some size that is convenient.  I like it.

If you do that, you don't even have to keep track of the byte ranges you
have retrieved.  Missing bytes are no different than bad (corrupt) bytes -
both need to be repaired.  If you have an MD5 checksum for each part,
it will detect missing parts just as well as bad ones.  OK, so it's more
expensive in terms of computation, but it would avoid the hassle of
keeping track of posted part sizes and might be more reliable as a
result.  It also allows PAR's to be posted after the fact, as long as
the poster still has the original file and knows the PAR segment
size.

Joe

Re: Using Message-ID to store binary file information
#57669
Author: Andrew - Supernews
Date: Tue, 26 Mar 2002 15:52
18 lines
2170 bytes
In article <20020326004659.812$EM@newsreader.com>, Curt Welch wrote:
> Well, the idea of corrupt posts vs missing posts is something I haven't
> really even thought about.  Maybe the problem is worse than I realize.
> 
> Newsfeeds has had corruption problems for months from what I've read.
> Other than them, I'm not aware of corruption problems being "the norm"
> anywhere on usenet.  But I don't spend much time trying to download huge
> files so I don't have a lot of experience with that.

There's a problem at the moment with Cidera. Other than that, the vast
majority of corrupt uuencoded files I've personally seen have been
corrupted by the encoder or poster, not in transit. (but that has mainly
been with single-part files not multiparts)

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Page 2 of 3 • 107 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads