How to extract files from pgp file

1

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 <nsit_poison@yahoo.co.in>
sub   2048g/20242EB8 2009-12-17

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

nsit_poison

Posted 2012-04-20T06:05:51.600

Reputation:

1A 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 – 2012-04-20T11:42:01.327

Answers

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.

ckhan

Posted 2012-04-20T06:05:51.600

Reputation: 5 689