also, looking at the Ubuntu release, they have an ISOs, MD5SUMS, and
MD5SUMS.gpg: http://releases.ubuntu.com/8.04/
if that style became "popular", do you think something like this is
too clunky? you could have a chain of trust..."MD5SUMS is signed and
ISO file checksum matches one listed there."
<file name="hardy-desktop-i386.iso">
..
<hash type="md5" file="MD5SUMS">508ff37c52bf0cebe3518bd655595913</hash>
..
<file name="MD5SUMS">
<signature type="pgp">
--
(( Anthony Bryan ... Metalink [ http://www.metalinker.org ]
)) Easier, More Reliable, Self Healing Downloads
Nils wrote:
> On May 13, 8:04 am, "Anthony Bryan" <anthonybr...@gmail.com> wrote:
>> Tatsuhiro Tsujikawa, author of aria2, suggested allowing chunk
>> checksums in base32 or base64 which could make for smaller metalinks.
>
> base32 is almiost unknown (as is base85 for example).
>
> base64 has IIRC 33% overhead while the hexadecimal representation
> doubles everything in size.
> However I don't think it makes much sense to actually use it here,
> weighting the added format/implementation complexity against the
> benefits.
> base64 wasn't designed to "compress" data, but to represent binary
> data as "text" for systems choking on binary data like emails.
A hash IS binary data. A series of X bits. Hexadecimal is one way to
represent it. XML is a text system. base64 makes sense to me (base32
is much less common).
> Furthermore there then should be some kind of type attribute to
> distinguish between b64 and hex hashes, which will take away most
> gains again.
There is no need for this attribute. The hash is already tagged with a
"type" attribute. Based on the hash type and length of contained string
you can determine if it is hexadecimal or base64/32.
> Oh, and it isn't exactly backwards compatible.
>
>> another thing we have talked about is "Accept-Encoding: gzip" for
>> compressing them for transfer.
>
> This would do better compared to b64. Clients which support gzip for
> regular transfers likely support it already because they likely use
> the same http implementation for both.
> And server side things like multiviews/mod_deflate are your friends.
> Even IIS seems to have a fairly decent implementation even caching the
> gzipped results.
>
Agree this would be better. More backward compatible and you would see
gains for the whole .metalink file, like urls. Technically I'd say this
is outside of the scope of the Metalink Spec, there is nothing stopping
servers and clients from using gzip already.
>> also, looking at the Ubuntu release, they have an ISOs, MD5SUMS, and
>> MD5SUMS.gpg:http://releases.ubuntu.com/8.04/
>>
>> if that style became "popular", do you think something like this is
>> too clunky? you could have a chain of trust..."MD5SUMS is signed and
>> ISO file checksum matches one listed there."
>>
>> <file name="hardy-desktop-i386.iso">
>> ..
>> <hash type="md5" file="MD5SUMS">508ff37c52bf0cebe3518bd655595913</hash>
>> ..
>> <file name="MD5SUMS">
>> <signature type="pgp">
>
> I kinda think this is doubles the efforts.
> PGP signatures, being a hybrid encryption method, in fact only sign
> the hash of the message (the download in our case). Usually sha1
> hashes are used, but there are other algorithms supported as well.[1]
> So a usually the computation goes like this: sign(hash(message))
> But now it becomes: sign(hash(hash(message))
>
Yes, from a cryptographic standpoint this is a really ugly way to do
things. Also a pain to implement well on the client (why I haven't done
it for Metalink Checker yet!). You then also need to know something
about the file format of the MD5SUMS or some other format someone might
decide to use.
Note that this does make sense from a computational standpoint since
when you are dealing with files the size of ISOs it can take a long time
to compute a hash.
1. The cryptographically most efficient way, you must compute the iso
hash twice:
md5sum command: MD5SUMS = hash(iso)
gpg command: signature = encrypt(hash(iso))
* Note: You might be able to get gpg to output the hash value somehow
and skip the md5sum step, but I haven't been able to figure out how yet.
2. The computationally most efficient way, you only compute the iso hash
once:
md5sum command: MD5SUMS = hash(iso)
gpg command: signature = encrypt(hash(MD5SUMS))
> The proposed style is flawed as well.
> MD5SUMS contains the output from md5sum for multiple files.
>
I wouldn't call this a flaw, you just need to know the file format and
have the filenames match what is being downloaded, which should be the
case normally.