[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Uploading to Asimov
- Subject: Re: Uploading to Asimov
- From: pausch@saaf.se (Paul Schlyter)
- Date: Tue, 09 Aug 2005 22:44:03 GMT
- Newsgroups: comp.sys.apple2, comp.emulators.apple2
- Organization: Unknown
- References: <42f6947a$0$19657$636a15ce@news.free.fr> <EpTJe.8155$p%3.35450@typhoon.sonic.net> <dda4i2$qtj$1@merope.saaf.se> <ql4Ke.8225$p%3.35465@typhoon.sonic.net>
- Xref: g2news1.google.com comp.sys.apple2:4876 comp.emulators.apple2:232
In article <ql4Ke.8225$p%3.35465@typhoon.sonic.net>,
Andy McFadden <fadden@fadden.com> wrote:
> In comp.sys.apple2 Paul Schlyter <pausch@saaf.se> wrote:
>>> The real advantage of the compressed formats, IMHO, is less about
>>> compression and more about having a CRC on the files. That takes
>>> the guesswork out of whether or not the images are damaged.
>>
>> You don't need a compression program for that! Instead you could
>> use an MD5 utility, which produces MD5 hashes from the file contents.
>> The MD5 hashes are then put in a separate ASCII file. This method is
>> used on many other web sites.
>
> I dislike this approach, for the following reasons:
>
> - Separate files can be lost.
> - Separate files aren't always updated when the main file is updated.
> - People may not check them. If somebody downloads a file and it doesn't
> work, they're more likely to post a "does this work" message than
> go back and look for an MD5 file. Having it checked automatically by
> the unpacking program makes it impossible to avoid/ignore.
Separate files requires more of the user and the maintainer, that's true.
>> MD5 also provides better detection than CRC - not only because it has
>> more bits (MD5 has 128 bits, compared to 16 or 32 bits for the most
>> common CRC's), but because it detects not merely accidential
>> corruption but also deliberate modification of the files.
>
> My concern in an Apple II archive isn't for deliberate corruption.
>
> I agree that this is a general concern, and a cryptographically secure
> hash certainly beats a CRC. If that's a real worry, though, MD5 gets
> you nothing by itself, because if I can replace the main file then I can
> also replace the MD5 file. You need a digital signature.
A digital signature can be forged as easily as an MD5 hash. To
really guard against deliberate tampering with the data, you need
more than that: you need a PKI, i.e. a digital certificate signed by
a CA you trust.
>> For ensuring the integrity of the files, MD5 is much superior to CRC.
>
> Perhaps, but in this case it seems inconvenient and excessive. If it
> were added to the Zip format that would be a good thing, but if all you're
> trying to detect is somebody using an ASCII transfer mode, a 16-bit CRC
> is probably good enough.
If you try to unpack a Zip file transferred by FTP in ASCII mode, you
probably won't even get as far as checking any CRC, because headers/etc
before that will get corrupt.
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/