🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #62463

Re: xBin (Power-Post 2003 - requesting input from authorities..)

#62463
From: Kjetil Torgrim Homme
Date: Fri, 27 Dec 2002 21:30
103 lines
5759 bytes
(btw, apologies for posting replies without reading the complete
thread first.)

[Curt Welch]:
>
>   Also, given only the signature data from one article, you don't
>   have enough information to calculate the hash, so you have no way
>   of knowning if the data from that article is valid.

right.  but it's _very_ hard to create a bogus tree which is not
trivially rejectable -- you'll need to find a hash collision, two 320
bit values hashing to the same 160 bit hash.  no such attack is known
for SHA-1, and if you manage to do it, the write-up would be a nice
doctoral thesis.

>   It turns into a complex problem that's really just a waste of time
>   to even try and write the code to solve.

probably, but _if_ someone starts doing attacks, it'd be nice if it
was possible to combat it using clever code.

there are two issues:

 * wasting people's bandwidth by posting articles with the hashes
   copied verbatim from the original, but containing bogus data.

there is no defence against this, but it is relatively benign from the
user's viewpoint.  it's worse for the server, since its stats on
completeness would be skewed, and this makes it harder to do
intelligent feeding or expire tricks.  it could try to verify the hash
and throw it out if its a fake.  this requires the part to include its
own hashes, since the server really don't want to look at several
articles to make decisions.

 * foiling the download program so that it keeps bad data and throws
   out good data

this is really only a problem if the download program tries to be too
intelligent for its own good :-)

as far as I can tell, it also requires an attack on SHA-1 to work.
the premise being that the article contains its own valid hash, the
attacker needs to calculate not just one, but log2(N) hashes which are
correct.  borrowing Rene's graphic:

       root
      /     \
     e       f
    / \     / \
   a   b   c   d
  / \ / \ / \ / \
  1 2 3 4 5 6 7 8

the attacker posts a fake 7.  it contains the hashes 7 (correct, but
bogus), 8, c, e and root (given).  now find values for 8, c and e such
that

  sha1(e + sha1(c + sha1(7 + 8))) == root

I think this is a phenomenal task, possibly worthy of a Nobel prize :-)

without correct values of 8, c and e, the fake part can be classified
as such by just inspecting the hashes found in the headers.  again,
the inclusion of the part's own hash in the headers is helpful.

>   The nice thing about adding the extra hash values to the signature
>   is that looking at the Signature: header alone, you would be able
>   to verify all those values were valid without the help of any
>   other data.  But for part sizes around 1MB, you might have to add
>   as many as 7 additional hash values to a header which I fear might
>   already be too large for very large posts.

worst case is 18, actually.  example: each part is 1022b (b=blocks)
large. consider the part at offset 1537b.  it needs to contain the
hashes for 1537/1 (/1 means just the one block), 1538/2, 1540/4,
1544/8, 1552/16, 1568/32, 1600/64, 1664/128, 1792/256, 2048/256,
2304/128, 2432/64, 2496/32, 2528/16, 2544/8, 2552/4, 2556/2, 2558/1.

okay, this could never happen, since the offset is an odd value while
the segment size is even, but 16 hashes is a real possibility.

I'm not sure we need this, though.  isn't a single hash of the entire
segment good enough?

>   I need to find out more about what the current news servers do
>   with large headers.  I know INN had limits in the 1000 byte range,
>   but that might only be for headers which the server was trying to
>   use and not for "other" headers.

I think that's only a limit for a single line, not a header.
typically a problem with References, which some clients still don't
fold or expect to be folded.

>   And it had line length limits when you posted an article, but it's
>   easy enough to fold the header to stay under the line length limit
>   if that's the only issue.

yes.

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html
Technical Details
Message-ID: <1ry96bxi7m.fsf@sjau.ifi.uio.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.equant.no!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
References: <cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <1rfzsoaacf.fsf@vingodur.ifi.uio.no> <20021223180543.105$Wn@newsreader.com> <20021223185652.700$BS@newsreader.com> <20021223203608.351$Qp@newsreader.com> <20021223223311.286$Mx@newsreader.com> <20021224034919.081$PY@newsreader.com> <20021224151028.847$pv@newsreader.com> <20021225035755.305$XK@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <1ry96bxi7m.fsf@sjau.ifi.uio.no>
Subject: Re: xBin (Power-Post 2003 - requesting input from authorities..)
Date: Fri, 27 Dec 2002 21:30:53 +0000
From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no>
References: <cdda0v4h6t52ov7abf1j0qkpo843itf4se@4ax.com> <cfka0vsbjdlbdmtv2gg8qnehok033qh5f1@4ax.com> <20021223041127.986$6M_-_@newsreader.com> <1rfzsoaacf.fsf@vingodur.ifi.uio.no> <20021223180543.105$Wn@newsreader.com> <20021223185652.700$BS@newsreader.com> <20021223203608.351$Qp@newsreader.com> <20021223223311.286$Mx@newsreader.com> <20021224034919.081$PY@newsreader.com> <20021224151028.847$pv@newsreader.com> <20021225035755.305$XK@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.equant.no!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
Newsgroups: news.software.nntp
Organization: Dept. of Informatics, Univ. of Oslo, Norway
Lines: 102
NNTP-Posting-Host: sjau.ifi.uio.no
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: maud.ifi.uio.no 1041024653 9179 129.240.65.207 (27 Dec 2002 21:30:53 GMT)
X-Complaints-To: abuse@ifi.uio.no
NNTP-Posting-Date: 27 Dec 2002 21:30:53 GMT
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7