Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Xceed.Zip.InvalidDecryptionPasswordException:

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • ncookson
    Participant
    Post count: 2
    #43972 |

    Using Xceed.Zip version 6.0.16354.14180. Can’t unzip a zip file encrypted with pkAES-128 Deflate
    7 Zip unzips this file with no problems.
    QuickZip throws Xceed.Zip.InvalidDecryptionPasswordException:
    ZipArchive.CopyFilesTo throw same and event handler coded to prompt for password. Password never accepted!
    Anyone have a recommendation?

    Here the zip file stats as reporeted by 7Zip

    Listing archive: BOA_VOE_BATCH_072616_112003.zip


    Path = XXXXX.zip
    Type = zip
    Physical Size = 5098

    ———-
    Path = XXXXX.csv
    Folder = –
    Size = 40048
    Packed Size = 4886
    Modified = 2016-07-26 13:20:04
    Created = 2016-07-26 13:20:04
    Accessed = 2016-07-26 13:20:04
    Attributes = A
    Encrypted = +
    Comment =
    CRC = FCC92260
    Method = pkAES-128 Deflate
    Host OS = FAT
    Version = 51
    Volume Index = 0

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi

    When you get the exception, please “drill down” the inner exception to get more information. Each System.Exception object contains an InnerException property. You can loop on each inner exception, taking note of each exception along the way until InnerException is null.

    For example:

    try
    {
    // TODO: Code that causes an exception
    }
    catch( Exception exception )
    {
    // Output some information about it
    Console.WriteLine( “–>{0}: {1}\n{2}”, exception.GetType().Name, exception.Message, exception.StackTrace );

    // Fetch the inner exception
    exception = exception.InnerException;

    // While there is an exception
    while( exception != null )
    {
    // Output some information about it
    Console.WriteLine( “–>Inner exception: {0}: {1}\n{2}”, exception.GetType().Name, exception.Message, exception.StackTrace );

    // Fetch the inner exception
    exception = exception.InnerException;
    }
    }

    Please send us the log that this generates. Thank you.

    ncookson
    Participant
    Post count: 2

    Here’s the log.
    –>QuickZipException: An error occurred while extracting files from the zip file.
    at Xceed.Zip.QuickZip.Unzip(String zipFileName, String destinationFolder, String decryptionPassword, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, DiskRequiredCallback diskRequiredCallback, ByteProgressionCallback byteProgressi
    onCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToUnzip)
    at Xceed.Zip.QuickZip.Unzip(String zipFileName, String destinationFolder, String decryptionPassword, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, String[] filesToUnzip)
    at DJFP1_3Party_Test.Program.ZipTest() in C:\Users\ncookson\Documents\Visual Studio 2015\Projects\TestCode\DJFP1_3Party_Test\Program.cs:line 55
    –>Inner exception: InvalidDecryptionPasswordException: The decryption password is invalid.
    Type: Xceed.Zip.ZippedFile
    FullName: \BOA_VOE_BATCH_072616_112003.csv
    Zip file: C:\Users\ncookson\Documents\Visual Studio 2015\Projects\TestCode\DJFP1_3Party_Test\bin\x64\Debug\BOA_VOE_BATCH_072616_112003.zip
    at Xceed.Zip.ZipItemHandler.OnPreparingReadStream(FileSystemEventsSession session, FileShare share, Stream innerStream, Object context)
    at Xceed.Utils.Storage.StorageItemHandler.OpenRead(FileSystemEventsSession session, FileShare share, Object context)
    at Xceed.Zip.ZipItemHandler.OpenRead(FileSystemEventsSession session, FileShare share, String decryptionPassword, Boolean useUnsafeCompressionMethodVersions)
    at Xceed.Zip.ZippedFile.DoOpenRead(FileSystemEventsSession session, FileShare share, String decryptionPassword, FileOptions fileOptions)
    at Xceed.Zip.ZippedFile.DoOpenRead(FileSystemEventsSession session, FileShare share, FileOptions fileOptions)
    at Xceed.FileSystem.AbstractFile.OpenRead(FileSystemEvents events, Object userData, FileShare share, FileOptions fileOptions)
    at Xceed.FileSystem.AbstractFile.DoCopyTo(FileSystemEventsSession session, FileSystemItem destination, Boolean replaceExistingFiles)
    at Xceed.FileSystem.FileSystemItem.ListCopyToCore(FileSystemEventsSession session, ItemPair currentItemPair, Boolean replaceExistingFiles)
    at Xceed.FileSystem.MultipleItemListFolder.ListCopyTo(FileSystemEventsSession session, Boolean replaceExistingFiles)
    at Xceed.FileSystem.AbstractFolder.CopyItemsTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean includeFolders, Boolean replaceExistingFiles, Object[] filters)
    at Xceed.FileSystem.AbstractFolder.CopyFilesTo(FileSystemEvents events, Object userData, AbstractFolder destinationFolder, Boolean recursive, Boolean replaceExistingFiles, Object[] filters)
    at Xceed.Zip.QuickZip.Unzip(String zipFileName, String destinationFolder, String decryptionPassword, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, DiskRequiredCallback diskRequiredCallback, ByteProgressionCallback byteProgressi
    onCallback, ItemProgressionCallback itemProgressionCallback, Object userParams, String[] filesToUnzip)
    Press any key to continue . . .

    Fawzi [Xceed]
    Member
    Post count: 722

    Hi,

    Unfortunately, the archive uses the “pkAES” method and it is not supported by Xceed components at this time. You will not be able to decrypt the data of this archive with Xceed Zip components.

    “pkAES” refers to AES encryption as implemented by the PKWare company. They call it “strong emcryption”. It is a proprietary implementation and requires a license to use. Xceed supports the WinZipAES format for AES encryption, which is an open format and more widely used.

    After checking, we see that PKWare does make some portions of their strong emcryption specification free to use without a license but it is not part of Xceed’s features right now. We will add this to the list of features to add in future releases.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.