Endpoint Encryption

 View Only
  • 1.  Detached signature target file, file not found error

    Posted Feb 13, 2012 09:35 AM

    Hi all!  I'm having trouble decrypting a file sent by a vendor.  I get the following error:

    /opt/pgp/bin/pgp --decrypt FILE2012.TXT.pgp --passphrase "pass" --input-cleanup remove
    Warning: PGPsdk running in local mode.
    FILE2012.TXT:decrypt (1082:detached signature target file)
    FILE2012.TXT.pgp:decrypt (3090:operation failed, file not found)

    So it looks like it's looking for the existence of a detached signature target file that has the same name as the original encrypted content.  I have a sneaking suspicion the vendor is screwing something up, but I can't figure out exactly what.  If I "touch" the file it's looking for, it's partially successful:

    /opt/pgp/bin/pgp --decrypt FILE2012.TXT.pgp --passphrase "pass" --input-cleanup remove
    Warning: PGPsdk running in local mode.
    FILE2012.TXT:decrypt (1082:detached signature target file)
    FILE2012.TXT.pgp:decrypt (3037:cannot verify signature)
    FILE2012.TXT.pgp:decrypt (3039:signing key 0xAA123456)
    FILE2012.TXT.pgp:decrypt (3083:could not create output file FILE2012.TXT)

    It won't overwrite the FILE2012.TXT file because it's already there, but it at least sees the detached signature target file it's looking for, even if it's just empty.  I've obviously changed the keyID (along with the filenames and passphrase) but it's worth noting that the actual keyID is NOT one I have in my keyring.

    If I redirect the output, I get what appears to be success:

    /opt/pgp/bin/pgp --decrypt FILE2012.TXT.pgp --passphrase "pass" --input-cleanup remove --output FILE.txt
    Warning: PGPsdk running in local mode.
    FILE2012.TXT:decrypt (1082:detached signature target file)
    FILE2012.TXT.pgp:decrypt (3037:cannot verify signature)
    FILE2012.TXT.pgp:decrypt (3039:signing key 0xAA123456)
    FILE2012.TXT.pgp:decrypt (0:output file FILE.txt)
    host12:/export/home/user1 $ ls -l FILE.txt
    -rw-------   1 root     root           0 Feb 13 09:30 FILE.txt

    I get no errors, but I'm not entirely sure that the file is supposed to be empty, and I'm wondering if it is only because I'm using the empty detached signature target file.

    The PGP documentation is awfully sparse on what a "detached signature target file" even is.  I'm also wondering if I get the public half of that AA123456 key from the vendor, if that might fix the problem; my thinking is it's only fiddling with the detached signature file because it can't find a matching key in my keyring.  Thoughts?

    Thanks!



  • 2.  RE: Detached signature target file, file not found error

    Posted Feb 14, 2012 09:14 AM

    The fact that signature cannot be verified do NOT affect file decryption.

    It´s authenticity just cannot be verified.

    something is wrong with the encrypted file.

    Is it 0 bytes?



  • 3.  RE: Detached signature target file, file not found error

    Posted Feb 14, 2012 09:46 AM

    Normally I'd agree that's true; we've definitely received other files that are encrypted and signed, that we don't have a public half of the signing key.  We get warnings, but the file decrypts fine.  In this case, the file refuses to decrypt unless I create an empty file with the name of the detached signature target file that it's looking for.  If I do that, I do get a signature warning that it ignores.

    The file, when decrypted, is 0 bytes.  But we should be able to decrypt even an empty file, right?

     

    Thanks!



  • 4.  RE: Detached signature target file, file not found error

    Posted Feb 14, 2012 10:22 AM

    not sure how the encryption algorithm works when file is blank, completely empty without characters.

    In the last command where you add detache file for signature, I dont´see any  confirmation that the file was decrypted... I think FILE.txt was just created because you specified output.

    anyway,what´s the size of the original encrypted file you received?



  • 5.  RE: Detached signature target file, file not found error
    Best Answer

    Posted Feb 14, 2012 02:36 PM

    The size of the file is 659 bytes, which seems to me to be a reasonable assumption as to what overhead PGP encrypting would add to an empty file.

    UPDATE: the vendor has confirmed that it should be an empty file.  It also appears as if when they send us files with actual data, the decryption works!  Weird.



  • 6.  RE: Detached signature target file, file not found error

    Posted Feb 14, 2012 03:32 PM

    You are right, this is odd.

    Thanks for the information.

    Please mark post as solution