1

I have a a.zip.pgp file along with an key.asc file. How can I extract the files from a.zip.pgp ?

I have tried the following:-

$ gpg --import key.asc

then

$ gpg --decrypt-files a.zip.pgp
gpg: encrypted with 2048-bit ELG-E key, ID 20242EB8, created 2009-12-17
gpg: encrypted with RSA key, ID 744D6CB7
gpg: decryption failed: secret key not available

$ gpk -k

pub   1024D/F8802D87 2009-12-17

uid                  Nsit-Poison <[email protected]>
sub   2048g/20242EB8 2009-12-17

Does anybody have any idea if this is because that I don't have the good key file ?

1
  • 1
    A pure guess is that the 'key.asc' file contains a public key, which can encrypt a file, which then can be decrypted with the correct private key (which you possibly don't have). This is the purpose of (p)gp(g). It would help to know the context in which you obtained these files.
    – Eroen
    Apr 20, 2012 at 11:42

1 Answer 1

1

Yes, you have the wrong key.

gpg -k lists the public keys (ie, the keys you need to encrypt something). You need the private key that matches the public key this file was encrypted with. When you have it, gpg -K (note capital) will list it with sec ("secret") instead of pub in the output you excerpted above.

You must log in to answer this question.