Endpoint Encryption

 View Only
Expand all | Collapse all

Error while decryption

  • 1.  Error while decryption

    Posted Jul 13, 2011 04:22 PM

    Hello,

    One of our client is sending a file for which we are facing issues while decryption. The error we get is "3131:multiple PGP blocks found in single input stream".

    We are running PGP Command Line 10.1 build 52 while the client is running gpg (GnuPG) 1.4.5 on Linux.

    Does anyone have any ideas?



  • 2.  RE: Error while decryption

    Posted Jul 13, 2011 05:04 PM

    This Knowledge Base Article may help.



  • 3.  RE: Error while decryption

    Posted Jul 13, 2011 09:35 PM

    I had gone through that article previously. It mentions 9.x

    Do we have the same issue in 10 too? The client is pretty sure that there are no multiple blocks in that file.

    Is there any alternate method to debug this?



  • 4.  RE: Error while decryption

    Posted Jul 14, 2011 12:26 AM

    ...but yes, this restriction on file processing is in PGP Command Line 10 also.  (Such a file is not RFC 4880 compliant which is why I would not use the word "issue" to describe PGP Command Line's behavior.)

    You could ask the client how they created the file they sent you; that will tell you if there are multiple files in there together.  You can also run "pgp --dump-packets" on the input file, and it will show you all the OpenPGP packets in the file.  In general the structure will be

     

    Old: Public-Key Encrypted Session Key Packet(tag 1)(268 bytes)
    <session key encrypted to the recipient key>
    New: Symmetrically Encrypted and MDC Packet(tag 18)(4096 bytes) partial start
    Ver 1
    Encrypted data [sym alg is encrypted in the pub session key above]
    (plain text + MDC SHA1(20 bytes))
    New: (4096 bytes) partial continue
    <and more such data packets>
     
    This is the actual encrypted data; possibly, the "partial continue" packets will not appear.
     
    If this pattern repeats (encrypted session packets followed by encrypted data) then there are multiple input blocks in the file.
     


  • 5.  RE: Error while decryption

    Posted Jul 14, 2011 03:50 PM

    Thanks David for the response.

    Its kinda strange. I am getting "dump packets (3090:operation failed, bad packet)" when I do a --dump-packets for that file.

    Any ideas?



  • 6.  RE: Error while decryption

    Posted Jul 14, 2011 07:53 PM

    Hm.  Please run your decryption, but with the "--debug --verbose" options.

    Are you seeing the "bad packet" error as the first output from --dump-packets?  If so it is possible that there is actually a problem with the file (e.g., it is a binary file that was transferred using ftp in ascii mode).



  • 7.  RE: Error while decryption

    Posted Jul 15, 2011 10:44 AM

    Thanks for the response.

    The output of the verbose is mentioned below.

    /export/home/gentran/.pgp/pubring.pkr:open keyrings (1006:public keyring)
    /export/home/gentran/.pgp/secring.skr:open keyrings (1007:private keyring)
    Decoding file xsellcollections_20110711_ADD.csv.pgp_20110711-105841_36913990_197... 100% (9.1MB)    
    xsellcollections_20110711_ADD.csv.pgp_20110711-105841_36913990_197:decrypt (3131:multiple PGP blocks found in single input stream)
    Wiping file pgp-15309-0.tmp... 100%  
    pgp-15309-0.tmp:decrypt (0:file wiped successfully)

    I am thinking of the transmission mode too and I would need to check on that. btw, do you think the armor option will help here?



  • 8.  RE: Error while decryption

    Posted Jul 15, 2011 11:16 AM

    And they are using Connect Direct(NDM) to transfer files to us.



  • 9.  RE: Error while decryption

    Posted Jul 15, 2011 07:40 PM

    To ensure that transmission problems weren't in play.

    Do you see the "bad packet" immediately, or after some output occurs?



  • 10.  RE: Error while decryption

    Posted Jul 18, 2011 11:27 AM

    I just get the below output when I run
    pgp --dump-packets xsellcollections_20110711_DEL.csv.pgp_20110711-110102_36914029_197

     xsellcollections_20110711_DEL.csv.pgp_20110711-110102_36914029_197:dump packets (3090:operation failed, bad packet) 
    


  • 11.  RE: Error while decryption

    Posted Jul 18, 2011 12:38 PM

    Given that dump-packets fails immediately, I believe there is some corruption to the file.  I would try having it re-sent, verifying that binary transfer modes are used.  Or use ascii armoring.



  • 12.  RE: Error while decryption

    Posted Jul 18, 2011 01:43 PM

    The client is going to try and encrypt the file using the -armor option. Let us see if it helps.