Another encrypted zip file problem - Zip file experts please

Another encrypted zip file problem - Zip file experts please

Post by Chris Morriso » Thu, 06 Jun 2002 00:25:04



Could someone tell me if there is any difference between a normal encrypted
zip archive, and an encrypted archive that is spanned over several floppy
diskettes.

My problem is that have successfully written some code to extract and
decrypt files from a normal single zip archive, i.e.

- I have extracted and decrypted the 12 byte encryption header.
- I have compared the last byte of the header with the high order byte of
the file being extracted to ascertain that the password is correct.

As I have said, this works fine on a single archive, however when I take the
same files and encrypt them in a spanned archive (over several floppies)
using the same password, when my program read and decrypts the 12 byte
header the last byte does not match the high byte of the CRC even though the
password is correct.

If I skip this bit and just decrypt the data in the zip file anyway, it
decrypts and extracts fine with no problems, suggesting that there is
nothing wrong with the data.

This has really got me stumped, any help would be appreciated.

Regards

Chris

 
 
 

Another encrypted zip file problem - Zip file experts please

Post by Phil Frisbie, Jr » Thu, 06 Jun 2002 01:49:47



> Could someone tell me if there is any difference between a normal encrypted
> zip archive, and an encrypted archive that is spanned over several floppy
> diskettes.

> My problem is that have successfully written some code to extract and
> decrypt files from a normal single zip archive, i.e.

> - I have extracted and decrypted the 12 byte encryption header.
> - I have compared the last byte of the header with the high order byte of
> the file being extracted to ascertain that the password is correct.

> As I have said, this works fine on a single archive, however when I take the
> same files and encrypt them in a spanned archive (over several floppies)
> using the same password, when my program read and decrypts the 12 byte
> header the last byte does not match the high byte of the CRC even though the
> password is correct.

It has been a while since I worked with spanned ZIP files, but are you checking
the CRC of the first disk, or the last disk? I believe you need to check the
last disk, but I could be wrong.

Quote:> If I skip this bit and just decrypt the data in the zip file anyway, it
> decrypts and extracts fine with no problems, suggesting that there is
> nothing wrong with the data.

> This has really got me stumped, any help would be appreciated.

> Regards

> Chris

Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

 
 
 

Another encrypted zip file problem - Zip file experts please

Post by Chris Morriso » Tue, 11 Jun 2002 05:44:38


I've cracked it.

For some reason spanned zip files have bit 3 of the general purpose bit flag
set to indicate the presence of an 'Extended File Header'. In this case the
last byte of the 12 byte encryption header is compared with the high order
byte of the files 'Modified Time' field (not the CRC) to verify the
password. I discovered this by scouring the Crypt.c source file in the
InfoZip library http://www.info-zip.org/pub/infozip/

This is very odd, because, according to the PKZIP Appnote.txt; if bit 3 of
the general purpose bit flag is set the fields: crc-32, compressed size and
uncompressed size are set to zero in the local header with the correct
values put in the data descriptor immediately following the compressed data.

Can anyone shed any light on this?

Regards

Chris

 
 
 

1. ZIP files encrypted with strong encryption (PKZIP for Windows v6)

I am posting this because I am getting desperate, I am writing a DLL in
Visual C++ to extract .ZIP files.

I am testing it with some files I have zipped using strong encryption (AES
256 bit and Digital Signatures, etc.) however there is an extra field in the
central directory (Strong Encryption ID Tag 0x0017) which is not documented
in PKWARE's Appnote.txt.

I have e-mailed PKWARE and am awaiting a reply, but I was wondering if
anyone has any information on this extra-field or knows where I could find
any.

Any help would be appreciated.

Chris

2. IF YOU ARE A NON DROPPER ------> POST YOUR GAMERTAG HERE!

3. Zip several files -> severalfiles.zip?

4. SCSI ID Setting simple question

5. ZIP a ZIP file?

6. Windows 2000 SP1 now availble

7. Encrypted Zip FIles

8. Want:style file for describing Algorithms

9. Can't unzip file zipped to zip drive

10. unzipping encrypted zip files on the mac

11. How to unzipping password encrypted .zip files?

12. Unzipping password encrypted .zip files. How to?

13. HELP: Where's Info-ZIP/free .zip file creator?