Menu

#97 Archive libraries needs cleaner compression/crypto support

open
nobody
None
6
2003-04-15
2003-04-09
Anonymous
No

Althogh 7-Zip supports ZIP files and supports deflate,
implode, and BZIP2 decompressions, it does not
recognize BZIP2 and DCL Implode compressions used
by PKZIP 6.0 (files inside ZIP archive compressed by
DCL Implode is recognized as 'PKImploding' in 7-Zip File
Manager, but not extractable). Similarly, 7Zip does not
recognize zip files using AES-128 encryption, the
method used by both PKZIP 6.0 and WinRAR. I do not
recommended the quick fix solution involving statically
inserting codes into the archive format library. Instead,
it should be fixed more cleanly by separating
compression and encryption methods from file formats,
with the archive format library linking to external
compression and encryption libraries. This way enables
cleaner and more complete support of different archive
types.

I realize this may involve more work and may have to
wait until 7-Zip 3, but IIRC such solution is partially
available to 7z archive, and it is important to extend the
efforts into other archive formats, especially now that
other compression titles are incorporating existing
techniques to build custom archive formats.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2003-04-10

    Logged In: YES
    user_id=65083

    I'm not sure that these methods are documented.

     
  • Nobody/Anonymous

    Logged In: NO

    Implode was in info-zip 1.1 IIRC. You can find all PKZIP
    packing methods and C source (up to deflate) in G64
    homepage[1] or PKWARE's homepage[2]. It is hinted
    Deflate64 is just deflate with 64K dictionary, and 7-Zip already
    does the decompression part so the compression end should
    be no problem. AES-256 is already used by 7-ZIP, and AES-
    128 is just a lowered bit version of AES-256. You can find
    reference code and specs at NIST[3]. Updated PKZip 4.5 file
    format is on PKWARE[2]. Bzip2 documentation can be
    found on Redhat[4].

    I suspect DCL implode is just another variant of the old
    implode method, but there is no guarantee.

    [1] http://www.cs.tut.fi/~albert/Dev/gunzip/
    [2]
    http://www.pkzip.com/products/enterprise/white_papers/appno
    te.html
    [3] http://csrc.nist.gov/CryptoToolkit/aes/rijndael/
    [4] http://sources.redhat.com/bzip2/

     
  • Igor Pavlov

    Igor Pavlov - 2003-04-10

    Logged In: YES
    user_id=65083

    AES and BZip are not problems.
    But there is no documentation how pk uses them.

    deflate64:
    -mm=9
    or m=9 in GUI.

     
  • Nobody/Anonymous

    Logged In: NO

    I suspect Bzip2 is probably done the same way as original
    Bzip2. But crypto is another matter. However, the detailed
    document view used in PKZIP 6 Professional shows that 16
    bytes are added to the end of each central directory file
    header when AES-128 encryption is used. I suppose this is
    the password, probably encrypted with AES.

     
  • Igor Pavlov

    Igor Pavlov - 2003-04-10

    Logged In: YES
    user_id=65083

    Can you send me small zip examples?
    1) using bzip
    2) using AES

     
  • Nobody/Anonymous

    Logged In: NO

    I have play around the BZip2 feature with PKZIP 6.0 and
    discovered PKZIP 6.0 compresses BZip2 identically as 7-Zip.
    First, Zip files are created with PKZIP 6.0 using BZip2 at level
    9, and create BZip2 files from 7-Zip with maximum
    compression ratio. After ripping the compressed data from
    the ZIP file and comparing it to the BZip2 archive, it turns out
    both files are identical. It seems there are too many software
    patents even for PKWARE to 'optimize' BZip2 algorithm.
    Either way, it means 7-Zip can soon export ZIP files with
    BZip2 compression with ease.

    No such luck for AES-256, however. It seems the crypto keys
    are generated in different methods. Probably with the old
    PKZIP 2.04 methods, but there is no way to test it.

    BTW how do I sent attachments via sourceforge forums?

     
  • Nobody/Anonymous

    Logged In: NO

    I have play around the BZip2 feature with PKZIP 6.0 and
    discovered PKZIP 6.0 compresses BZip2 identically as 7-Zip.
    First, Zip files are created with PKZIP 6.0 using BZip2 at level
    9, and create BZip2 files from 7-Zip with maximum
    compression ratio. After ripping the compressed data from
    the ZIP file and comparing it to the BZip2 archive, it turns out
    both files are identical. It seems there are too many software
    patents even for PKWARE to 'optimize' BZip2 algorithm.
    Either way, it means 7-Zip can soon export ZIP files with
    BZip2 compression with ease.

    No such luck for AES-256, however. It seems the crypto keys
    are generated in different methods. Probably with the old
    PKZIP 2.04 methods, but there is no way to test it.

    BTW how do I sent attachments via sourceforge forums?

     
  • Nobody/Anonymous

    Logged In: NO

    Apparantly attachment feature only works when starting new
    message, but not when replying threads.

     
  • Igor Pavlov

    Igor Pavlov - 2003-04-15

    Test Attached file

     
  • Igor Pavlov

    Igor Pavlov - 2003-04-15

    Logged In: YES
    user_id=65083

    I'll try to install pkzip myself.

     
  • Igor Pavlov

    Igor Pavlov - 2003-04-15
    • priority: 5 --> 6
     
  • Igor Pavlov

    Igor Pavlov - 2003-04-15

    Logged In: YES
    user_id=65083

    I've added Bzip2 supporting.
    About AES - seems my pkzip's version doesn't support
    it.
    If you can create small archive with AES, you can send it
    to me via e-mail.
    I don't think that I'll be able to add AES suport without
    documentation about implementing aes in zip.
    But anywhere I must have some example archive.

     
  • Nobody/Anonymous

    Logged In: NO

    WinZip posted its version of encryption in it's site[1]. Note
    that it generates different ZIP from PKWARE's. Also, PKWare
    updated its file format document, but still no certificate check.

    [1] http://www.winzip.com/aes_info.htm

     

Log in to post a comment.