Article View: news.software.nntp
Article #63784Re: Content-SHA1-Tree
From: Curt Welch
Date: Sat, 01 Feb 2003 05:56
Date: Sat, 01 Feb 2003 05:56
133 lines
6651 bytes
6651 bytes
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
> [Curt Welch]:
> Content-Integrator (isn't someone who checks integrity an integrator?)
>
> seriously, Content-Fragment-Check might work (but implies it can't be
> used with a complete file).
I think "Check" is the best idea I've seen so far. But you need to name of
the standard that defines the check in there as well (like Content-MD5 is
not Content-Hash).
So whether you use xBin or come up with a new names for the hash standard
part of the overall xBin concept I think it needs to be in the header:
Content-XYZ-Check:
Or maybe if the standard was only for this header (and of course the whole
segment-hash-tree concept), then the header will just become:
Content-XYZ:
Where "XYZ" was the name of the hash-tree standard which defined both the
details of the hash tree algorithm and the format for the header.
Sha1 Tree Hash?
Content-STH: xxxxx
But wait....
The hash data in this header by itself is useless (with the exception of
the first hash - the full file hash) if you don't also have the other meta
data which we have talked about putting in the Message-ID - the full file
size, and the offset and size of the included data segment. Maybe we
should look at the idea of putting all the segment meta-data in the same
header?
Content-Fragment: file-size=3493843; file-ct=video/mpeg;
frag-offset=1200; frag-size=12000;
sth=HHHHHHHHHHHHH aaaaaaaaaaaaa bbbbbbbbbbbbbbb ccccccccccccc
ddddddddddddd eeeeeeeeeee fffffffffffff gggggggggggggg
hhhhhhhhh;
But the large amount of check data might make the overall size of the
header an issue. Or maybe we can ignore than in this MIME context.
> but Jeremy made me realise that in the absence of a Message-ID
> convention, the client needs to do XHDR Content-SHA1-Tree to identify
> the parts, which will give him a lot more data than he really needs if
> he only wants a few files. a separate header for the root hash might
> be a good idea for that reason.
I think we should use the Message-ID convention on Usenet to solve that
problem. That is why I created the Message-ID convention in the first
place - to solve that very problem.
> hey! I believe Content-Disposition is "doing it right". well,
> actually, I would prefer message/fragment, but that requires more work
> to get accepted in MIME, and it also has less applicability for
> non-MIME messages.
I haven't studied MIME enough to offer a good guess at what would be the
"best" way to fit it in. Since we are talking about a major new concept
(file segements) being added after-the-fact, it's likely that the best
solution will require doing something "unnatural".
> > [...] where leading "zeros" (which is actually A in the MIME
> > base64 alphabet) [...]
>
> yeah, isn't that annoying? I wonder what the rationale for that was.
I'm sure it happened just by accident. It probably wasn't thought about in
the context of encoding base-64 numbers. It was just for encoding "8 bit
data" in a base-64 system. Someone probably suggested the characters A-Z,
a-z, 0-9, and + and /, (in that order), so that became the order for the
alphabet.
> > I'm thinking something like 32K blocks
> > would be better. But is making things worse for uuencode now
> > going to prevent us from every getting to the point where we would
> > want to build this xBin file system in the future? Maybe.
>
> we still don't know of any uudecode implementations which has a
> problem with short lines ...
Yeah, we could do some testing of the major tools to answer that.
But the other thing I realized was this is only an issue for multipart
uuencode posts. Single part uuencoded posts don't have any interaction
issues with the hash block size. And for multipart posts, it's getting
harder and harder to justify using anything other than yEnc. And when yEnc
is used, there are no hash block size issues. We can use any size and it
works fine with yEnc.
> > I think we are getting closer. The signature header is starting
> > to feel like it fits in MIME to me now.
>
> glad to hear it :)
>
> > Ok, but Content-Disposition just seems the wrong place to put this
> > data (it has nothing to do with display issues) which seems to me
> > belongs more in something like Content-Type. Has MIME used
> > Content-Disposition for any thing else like this which really
> > belongs in Conetent-Type?
>
> I don't think fragment information is more inappropriate for
> Content-Disposition than the filename.
I think the "real" file name is the name= paramater in the Content-Type:
header.
The filename= paramater in the Content-Disposition is the name used for the
"dispaly". I'm guessing. That would explain why it's there. Though I
don't really understand the difference in the two. Maybe it's like the DOS
8.3 name vs the DOS extended length name???
> > Something like:
> >
> > Content-Type: fragment/image/jpg; segment-offset=XXXX
> > segment-size=YYY
>
> that breaks too much with current practice, I think. there's also the
> problem that keywords aren't passed reliably to the helper
> application.
Maybe the all-in-one Content-Fragment: idea above would work?
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20030201005608.330$7D@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<1r3co0fjr2.fsf@vingodur.ifi.uio.no> <20030118143342.130$IV@newsreader.com> <1ru1g6j7o4.fsf@fjorir.ifi.uio.no> <20030119023525.732$LI@newsreader.com> <1radhv3jxj.fsf@vingodur.ifi.uio.no>Show Full Headers
Complete Article Headers
Message-ID: <20030201005608.330$7D@newsreader.com>
Subject: Re: Content-SHA1-Tree
Date: Sat, 01 Feb 2003 05:56:09 +0000
From: curt@kcwc.com (Curt Welch)
References: <1r3co0fjr2.fsf@vingodur.ifi.uio.no> <20030118143342.130$IV@newsreader.com> <1ru1g6j7o4.fsf@fjorir.ifi.uio.no> <20030119023525.732$LI@newsreader.com> <1radhv3jxj.fsf@vingodur.ifi.uio.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com KoT9r4_@@RPqJbe,Ti9_ZrMkBbynqrENVV@5g_mr,scGYi/
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 132